Skip to content

Commit

Permalink
Fix an 403 error: 'Repository access blocked. Reason is tos.' in get_…
Browse files Browse the repository at this point in the history
…oldest_unassigned_open_issue()
  • Loading branch information
hiroshinishio committed Nov 17, 2024
1 parent 77f4f4f commit 0668e82
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions services/github/github_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,11 @@ def get_oldest_unassigned_open_issue(
},
timeout=TIMEOUT,
)

# Return None if repository access is blocked (403 TOS error)
if response.status_code == 403 and "Repository access blocked" in response.text:
return None

response.raise_for_status()
issues: list[IssueInfo] = response.json()

Expand Down

0 comments on commit 0668e82

Please sign in to comment.