Reuse GitHub organization data and REST connections - #305
Merged
Merged
Conversation
Configure Octokit with Faraday persistent Net::HTTP adapter so paginated organization and team requests reuse connections. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f79283a-9bd3-46dd-8e33-676d145619c5
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3f79283a-9bd3-46dd-8e33-676d145619c5
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved review issues were identified.
Review tier: Lite (auto)
Findings: None
Note
Copilot is running an experiment and ran this review at Lite.
What changed in this PR
This pull request enables persistent HTTP connection reuse for Octokit GitHub REST requests while preserving existing behavior.
Changes:
- Adds the persistent Faraday adapter dependency.
- Configures and memoizes the Octokit client.
- Adds coverage for adapter selection and client reuse.
- Updates the gemspec and lockfile.
| File | Summary |
|---|---|
spec/unit/entitlements/service/github_spec.rb |
Verifies adapter configuration and client memoization. |
lib/entitlements/service/github.rb |
Configures persistent REST connections. |
Gemfile.lock |
Locks the new dependency chain. |
entitlements-github-plugin.gemspec |
Declares the runtime dependency. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Read the organization membership hash once while constructing a role group. This avoids repeatedly executing the deep HashOf return contract for every username in the organization. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5b8ed060-ed02-4402-b5e1-af407bcb2f61
trespilhas
approved these changes
Sep 14, 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.
Summary
faraday-net_http_persistentso large paginated organization reads reuse TCP/TLS connectionsentitlements-github-plugin1.2.5Benchmark results
In github/entitlements#141320:
The organization-member reuse change previously improved an unprofiled live benchmark from 495.22s to 483.24s and removed the accidental O(n^2) contract-validation path.
Validation
Supersedes #304.