Repository navigation
Conversation
Production goes back to REST for org members, as in 1.2.7. GraphQL is still used when GITHUB_RUN_ID is set so entitlements-caches can answer CI lookups. Bump version to 1.2.9. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The REST member-fetch order can miss users promoted between requests, leaving admin access in place without an entitlement until a later reconciliation.
1 open issue
What changed in this PR
This PR restores REST organization-member lookups outside GitHub Actions while preserving GraphQL access for CI caching.
Changes:
- Selects GraphQL when
GITHUB_RUN_IDis set and REST otherwise, preserving predictive-cache behavior. - Adds routing tests and updates existing mocks to use the API-selection method.
- Bumps the plugin version to
1.2.9.
| File | Description |
|---|---|
spec/unit/entitlements/service/github_spec.rb |
Tests API selection and updates cache-related expectations. |
spec/unit/entitlements/backend/github_org/controller_spec.rb |
Updates the reconciliation mock to use API selection. |
lib/version.rb |
Bumps the version to 1.2.9. |
lib/entitlements/service/github.rb |
Routes cache misses to GraphQL in Actions and REST elsewhere. |
Gemfile.lock |
Records the updated plugin version. |
Review effort: Balanced (auto)
nobe4
approved these changes
Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Org member lookups use GraphQL only when
GITHUB_RUN_IDis set (GitHub Actions). Everywhere else they use REST again, as they did before 1.2.8. Version bumped to 1.2.9.Why
1.2.8 (#314) switched org member lookups from REST to GraphQL everywhere, so that entitlements-caches could answer them in CI. That also changed production, where there is no cache. A production deploy then failed when GraphQL returned a 403 secondary rate limit on the second page of an org's members, and GraphQL errors are only retried on 5xx.
This keeps the CI benefit and puts production back on the 1.2.7 code path.
GITHUB_RUN_IDis already read for the run ID header from #316, so there's no new setting.Testing
bundle exec rspec spec/unitwithGITHUB_RUN_IDunset: 199 examples, 0 failures, 100% coverageGITHUB_RUN_ID=999 bundle exec rspec spec/unit: 199 examples, 0 failures, 100% coveragebundle exec rubocop lib spec: no offenses