Skip to content

Commit 8815f80

Browse files
authored
Make registry-admins a GitHub team (#281)
1 parent 35b7755 commit 8815f80

5 files changed

Lines changed: 13 additions & 5 deletions

File tree

‎README.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ Add the group's role to their `memberOf` in [`users.ts`](src/config/users.ts). I
5151

5252
Someone new to the organization gets an invitation by email and has no access until they accept it.
5353

54+
### Add or remove a registry admin
55+
56+
Add `ROLE_IDS.REGISTRY_ADMINS` to their `memberOf`, or remove it. The registry checks the `registry-admins` team each time an admin signs in, and admin tokens that were already issued last up to 5 minutes.
57+
5458
### Get an @modelcontextprotocol.io account
5559

5660
Maintainers, SDK maintainers and working group members can have one, and sign in to it with GitHub. Add these fields to your entry in [`users.ts`](src/config/users.ts), and add the sign-in role to your `memberOf`:
@@ -119,7 +123,7 @@ The [contributor ladder](https://modelcontextprotocol.io/community/contributor-l
119123

120124
Members need `push` on `modelcontextprotocol` because it only accepts pull requests from people with write access. Their `triage` is granted per repository, because the organization-wide triage role would also cover private ones.
121125

122-
Some teams are outside the ladder: `security-managers`, `security-team`, `workspace-sso`, the `*-auth` and `conformance-auth` code owner teams, the `*-collaborators` teams, `auth-contributors`, `access-maintainers` and `csharp-sdk-admin`.
126+
Some teams are outside the ladder: `security-managers`, `security-team`, `workspace-sso`, the `*-auth` and `conformance-auth` code owner teams, the `*-collaborators` teams, `auth-contributors`, `access-maintainers`, `registry-admins` and `csharp-sdk-admin`.
123127

124128
## Discord
125129

‎scripts/test-config.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ test('Collaborator teams have no parent team', () =>
209209
[ROLE_IDS.REGISTRY_COLLABORATORS, ROLE_IDS.TYPESCRIPT_SDK_COLLABORATORS].every(
210210
(id) => roleLookup.get(id)?.github?.parent === undefined
211211
));
212+
test('registry-admins has no parent or child teams', () =>
213+
roleLookup.get(ROLE_IDS.REGISTRY_ADMINS)?.github?.parent === undefined &&
214+
ROLES.every((role) => role.github?.parent !== ROLE_IDS.REGISTRY_ADMINS));
212215
test('A parent may be granted less than its child', () =>
213216
grantErrors([
214217
{ team: 'top', permission: 'pull' },

‎src/config/roleIds.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const ROLE_IDS = {
3131
REFERENCE_SERVERS_MAINTAINERS: 'reference-servers-maintainers',
3232
REGISTRY_MAINTAINERS: 'registry-maintainers',
3333
REGISTRY_COLLABORATORS: 'registry-collaborators', // GitHub only
34-
REGISTRY_ADMINS: 'registry-admins', // Google only
34+
REGISTRY_ADMINS: 'registry-admins', // GitHub only (admin sign-in to the registry)
3535
USE_MCP_MAINTAINERS: 'use-mcp-maintainers',
3636

3737
// ===================

‎src/config/roles.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,9 @@ export const ROLES: readonly Role[] = [
240240
{
241241
id: ROLE_IDS.REGISTRY_ADMINS,
242242
description: 'Registry administrators',
243-
google: { group: 'registry-admins' },
244-
// Google only - must not allow external members
243+
// The registry checks this team when an admin signs in.
244+
// No parent team, and must not be a parent: members of child teams would count too
245+
github: { team: 'registry-admins' },
245246
},
246247
{
247248
id: ROLE_IDS.USE_MCP_MAINTAINERS,

‎src/config/users.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ export const MEMBERS: readonly Member[] = [
276276
ROLE_IDS.TYPESCRIPT_SDK,
277277
ROLE_IDS.APPEALS,
278278
ROLE_IDS.RELEASE_MANAGERS,
279-
ROLE_IDS.REGISTRY_ADMINS,
280279
],
281280
},
282281
{
@@ -655,6 +654,7 @@ export const MEMBERS: readonly Member[] = [
655654
ROLE_IDS.TYPESCRIPT_SDK,
656655
ROLE_IDS.APPEALS,
657656
ROLE_IDS.RELEASE_MANAGERS,
657+
ROLE_IDS.REGISTRY_ADMINS,
658658
],
659659
},
660660
{

0 commit comments

Comments
 (0)