Skip to content

Add enterprise team membership support - #299

Open
buckelij wants to merge 2 commits into
mainfrom
buckelij-add-enterprise-teams
Open

Add enterprise team membership support#299
buckelij wants to merge 2 commits into
mainfrom
buckelij-add-enterprise-teams

Conversation

@buckelij

@buckelij buckelij commented Aug 18, 2026

Copy link
Copy Markdown
Member

The Revenue org wants to ship Copilot plugins to Revenue Hubbers via Copilot enterprise-managed settings https://github.com/github/agent-control-plane/issues/1290. Enterprise-managed settings work by applying policy to members of Enterprise Teams. Entitlements does not appear to currently support syncing to enterprise teams.

This PR adds support for enterprise team sync.

GitHub enterprise teams use a separate REST API from organization teams, so the existing backend cannot manage their membership. This adds a dedicated github_enterprise_team backend for synchronizing members of existing Enterprise Cloud teams.

The backend reads paginated membership state, computes entitlement differences, and applies additions and removals through the bulk membership endpoints.

Enterprise team creation is intentionally out of scope because the referenced API manages membership only. Authentication requires a classic PAT with read:enterprise and admin:enterprise; GitHub App and fine-grained tokens are not supported by these endpoints. Do we have an existing token configured with those scopes?

I ran into some hiccups trying to follow https://github.com/github/entitlements/blob/master/script/dev/README.md (I think these instructions are infrequently used) but I was able to get Copilot to set things up enough to smoke test.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1ea2214e-34f7-4e83-b7fd-413b4a534cd6
@buckelij
buckelij marked this pull request as ready for review August 21, 2026 22:43
Copilot AI balanced review requested due to automatic review settings August 21, 2026 22:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds enterprise-team membership synchronization alongside existing organization and team backends.

Changes:

  • Adds controller, provider, and REST API service components.
  • Supports paginated reads and bulk membership updates.
  • Adds configuration documentation and unit tests.
Show a summary per file
File Description
README.md Documents enterprise-team configuration.
lib/entitlements/backend/github_enterprise_team.rb Loads the new backend.
lib/entitlements/backend/github_enterprise_team/controller.rb Registers and orchestrates synchronization.
lib/entitlements/backend/github_enterprise_team/provider.rb Caches state and computes differences.
lib/entitlements/backend/github_enterprise_team/service.rb Implements enterprise-team API operations.
spec/unit/spec_helper.rb Loads the backend for tests.
spec/unit/entitlements/backend/github_enterprise_team/controller_spec.rb Tests controller behavior.
spec/unit/entitlements/backend/github_enterprise_team/provider_spec.rb Tests caching, diffs, and commits.
spec/unit/entitlements/backend/github_enterprise_team/service_spec.rb Tests API reads and updates.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 9/9 changed files
  • Comments generated: 3
  • Review effort level: Balanced

Comment thread lib/entitlements/backend/github_enterprise_team/service.rb
Comment thread README.md
Comment thread lib/entitlements/backend/github_enterprise_team/service.rb Outdated
@buckelij

Copy link
Copy Markdown
Member Author

@github/entitlements-reviewers @jar349 do you have a rough estimate of when you'll be able to review this PR?

@jar349

jar349 commented Aug 26, 2026

Copy link
Copy Markdown

rough estimate: By End of Next week plus or minus 2-3 business days

@TarteNouveau

Copy link
Copy Markdown

@TarteNouveau to schedule a call to discuss this PR and understand the larger context. @buckelij is there anyone else we should add to that call to discuss this ask?

@buckelij

Copy link
Copy Markdown
Member Author

@TarteNouveau you could also invite @gpadak and @travisgosselin

@TarteNouveau TarteNouveau self-assigned this Sep 3, 2026
@TarteNouveau

Copy link
Copy Markdown

meeting invite sent for 2026/09/10

@gpadak

gpadak commented Sep 4, 2026

Copy link
Copy Markdown
Member

Hello 👋 I want to connect this effort also to Product Ops and Design teams who are also looking to get onboarded to dogfood managed settings for Copilot client customization. The cc's there are @spaltrowitz and @cmcnally.

https://github.com/github/agent-control-plane/issues/1290 describes all the steps we need to take - enterprise teams management is one component of it. We also need help with the access required to enable managed-settings for the github enterprise.

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.

5 participants