diff --git a/backend/apps/github/common.py b/backend/apps/github/common.py index 6f7cefeae..17d24c58e 100644 --- a/backend/apps/github/common.py +++ b/backend/apps/github/common.py @@ -38,6 +38,8 @@ def sync_issue(issue_link): raise ValidationError(INVALID_ISSUE_LINK_FORMAT) github_token = os.getenv("GITHUB_TOKEN") + if not github_token: + raise ValidationError("GitHub token not found in environment variables.") github_client = Github(github_token) issue_number = int(path_parts[3])