aboutsummaryrefslogtreecommitdiffstats
path: root/arthur/apis/github/teams.py
diff options
context:
space:
mode:
Diffstat (limited to 'arthur/apis/github/teams.py')
-rw-r--r--arthur/apis/github/teams.py18
1 files changed, 1 insertions, 17 deletions
diff --git a/arthur/apis/github/teams.py b/arthur/apis/github/teams.py
index 489da90..e919051 100644
--- a/arthur/apis/github/teams.py
+++ b/arthur/apis/github/teams.py
@@ -1,24 +1,8 @@
import aiohttp
+from arthur.apis.github import GitHubError, HEADERS, HTTP_403, HTTP_404, HTTP_422
from arthur.config import CONFIG
-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
-
-
-class GitHubError(Exception):
- """Custom exception for GitHub API errors."""
-
- def __init__(self, message: str):
- super().__init__(message)
-
async def add_staff_member(username: str) -> None:
"""Add a user to the default GitHub team."""