Skip to content

fix(github datasource): skip blocked repositories when listing pages - #4217

Merged
FFXN merged 1 commit into
mainfrom
codex/github-blocked-repo
Nov 6, 2026
Merged

FFXN merged 1 commit into
mainfrom
codex/github-blocked-repo

Conversation

@FFXN

@FFXN FFXN commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Treat non-rate-limit GitHub 403 responses as API errors instead of parsing them as successful repository data.
  • Skip repositories for which GitHub returns Repository access blocked, and log the repository and block reason while continuing to list accessible repositories.
  • Load repository pages with a bounded five-worker pool to reduce the latency of listing up to 20 repositories while preserving their order.
  • Bump the GitHub datasource plugin version to 0.4.11.

Release Notes

  • Fixed GitHub Repository datasource page listing when a repository is blocked by GitHub. Accessible repositories continue to load.
  • Improved page loading speed for accounts with many repositories.

Context

The authenticated repository list can include a repository whose README endpoint returns HTTP 403 with block.reason: tos and a nonzero rate limit balance. Version 0.4.10 treats that response as successful JSON and then raises KeyError: 'path'. The sequential README, Issues, and PR requests also caused the page-list operation to exceed the upstream request timeout in the observed production case.

Change Type

  • Non-LLM plugin (datasource)

Version

  • Bumped top-level version in manifest.yaml to 0.4.11.

Verification

  • uv run --python 3.12 --frozen --with pytest python -m pytest tests/test_github.py -q (3 passed)
  • git diff --check

The regression tests cover a blocked repository, another non-rate-limit 403, an actual rate-limit 403, and accessible repositories before and after a blocked one.

Copilot AI balanced review requested due to automatic review settings November 6, 2026 10:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues for the blocked-repository handling and concurrent page-loading changes.

No open issues 🎉

What changed in this PR

Improves GitHub datasource page listing by skipping blocked repositories and reducing request latency while preserving repository order.

Changes:

  • Treat non-rate-limit 403 responses as errors; skip blocked repositories and log their block reason.
  • Load repository pages using a bounded five-worker pool.
  • Add regression tests for error handling and blocked-repository skipping, and bump the plugin version to 0.4.11.
File Description
datasources/​github/​tests/​test_github.py Tests 403 handling, blocked-repository skipping, and page order.
datasources/​github/​manifest.yaml Bumps the plugin version to 0.4.11.
datasources/​github/​datasources/​github.py Adds blocked-repository handling and concurrent page loading.

Review effort: Balanced

@hyoban
hyoban had a problem deploying to datasources/github November 6, 2026 10:30 — with GitHub Actions Failure
@hyoban
hyoban deployed to datasources/github November 6, 2026 10:32 — with GitHub Actions Active
@FFXN
FFXN merged commit 764a8ff into main Nov 6, 2026
9 of 11 checks passed
@FFXN
FFXN deleted the codex/github-blocked-repo branch November 6, 2026 10:33

This branch was successfully deployed

1 active deployment
datasources/github — d46dc638 Deployed Nov 6, 2026 by hyoban via test (datasources/github) #2976
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants