Skip to content

feat: sync GitHub teams from config via API with dry-run support #216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

BethGriggs
Copy link
Contributor

feat: sync GitHub teams from config via API with dry-run support

Adds a script to create and manage GitHub teams based on a YAML config file.
Supports parent-child team relationships and a --dry-run mode to preview
changes without applying them.

Also creates an initial configuration for community-plugins teams.

This replaces the earlier proof-of-concept from backstage/community-plugins#3946
with a functional implementation using the GitHub API.

chore: assign community-plugins-maintainers as CODEOWNERS for team config


Example of output:

$ node team-sync --config ./TEAMS/community-plugins-teams.yaml --dry-run
📄 Using config: /Users/bgriggs/backstage/backstage-community/github-teams/TEAMS/community-plugins-teams.yaml

🔧 Syncing team "community-plugins-rbac":
   🛠️ (dry-run) Would create team "community-plugins-rbac" under "community-plugin-owners"
   ➕ (dry-run) Would add "AndrienkoAleksandr"
   ➕ (dry-run) Would add "christoph-jerolimov"
   ➕ (dry-run) Would add "divyanshiGupta"
   ➕ (dry-run) Would add "PatAKnight"
   ➕ (dry-run) Would add "dzemanov"

✅ Team sync complete (dry-run mode).

I additionally tested this against a mock GitHub state where it does add/remove users to align with the config file.

Adds a script to create and manage GitHub teams based on a YAML config file.
Supports parent-child team relationships and a `--dry-run` mode to preview
changes without applying them.

Also creates an initial configuration for `community-plugins` teams.

This replaces the earlier proof-of-concept from backstage/community-plugins#3946
with a functional implementation using the GitHub API.

Signed-off-by: Beth Griggs <[email protected]>
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.

1 participant