From a6ac8a024cd0fc7ac5e17d7bb1b9ec4692e322d9 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Wed, 16 Jul 2025 10:00:10 +0100 Subject: Add new endpoints for removing organisation members --- arthur/apis/github/__init__.py | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'arthur/apis/github/__init__.py') diff --git a/arthur/apis/github/__init__.py b/arthur/apis/github/__init__.py index 11261da..3eb55a6 100644 --- a/arthur/apis/github/__init__.py +++ b/arthur/apis/github/__init__.py @@ -1,3 +1,23 @@ -from .teams import GitHubError, add_staff_member +from arthur.config import CONFIG -__all__ = ("GitHubError", "add_staff_member") +from .orgs import remove_org_member +from .teams import add_staff_member + + +class GitHubError(Exception): + """Custom exception for GitHub API errors.""" + + def __init__(self, message: str): + super().__init__(message) + + +__all__ = ("GitHubError", "add_staff_member", "remove_org_member") + +HEADERS = { + "Accept": "application/vnd.github+json", + "X-GitHub-Api-Version": "2022-11-28", + "Authorization": f"Bearer {CONFIG.github_token.get_secret_value()}", +} +HTTP_404 = 404 +HTTP_403 = 403 +HTTP_422 = 422 -- cgit v1.2.3