Migrate GitHub teams to infrastructure-as-code (#5)
* Migrate GitHub teams to infrastructure-as-code - Add 25 teams with proper hierarchy (steering-committee, SDK teams, working groups, interest groups) - Add 67 team members with their assignments - Add repository access configuration for all 21 repositories - Refactor github.ts to use config-driven approach with repoAccess.ts - Mark all MCP teams as GitHub-only with onlyOnPlatforms - Use RepositoryCollaborators for authoritative access management Note: GitHub Projects V2 permissions are not yet supported by Pulumi and must be managed manually. See https://github.com/pulumi/pulumi-github/issues/1006 * Add individual user collaborators to repository access Preserves direct collaborator access for users who have explicit permissions outside of team membership, including: - jspahrsummers: admin on multiple core repos - Go SDK collaborators (neild, rsc, rolandshoemaker, h9jiang) - C# SDK collaborators (jeffhandley, MackinnonBuck, jozkee, localden, PederHP) - Rust SDK collaborators (jamadeo, jokemanfire, 4t145) - Inspector collaborators (richardkmichael, olaservo, an-dustin, ashwin-ant) - Financial services IG collaborators (aniabot, imfing, sambhav, KengoA, nitsanh) - And others Without this, RepositoryCollaborators (authoritative mode) would remove all individual user access.
This commit is contained in:
parent
5b2b01db21
commit
7883dbc5e3
1 changed files with 772 additions and 10 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import * as github from '@pulumi/github';
|
||||
import { GROUPS } from './config/groups';
|
||||
import { REPOSITORY_ACCESS } from './config/repoAccess';
|
||||
import type { Group } from './config/utils';
|
||||
import { MEMBERS } from './config/users';
|
||||
|
||||
|
|
@ -28,3 +29,17 @@ MEMBERS.forEach((member) => {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
REPOSITORY_ACCESS.forEach((repo) => {
|
||||
new github.RepositoryCollaborators(`repo-${repo.repository}`, {
|
||||
repository: repo.repository,
|
||||
teams: repo.teams?.map((t) => ({
|
||||
teamId: teams[t.team].id,
|
||||
permission: t.permission,
|
||||
})),
|
||||
users: repo.users?.map((u) => ({
|
||||
username: u.username,
|
||||
permission: u.permission,
|
||||
})),
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue