workflows/team-sync: init

Creates a team sync workflow that pushes the current state of teams to a
JSON file, which can then be ingested by `lib.teams` to expose member
lists.

Co-Authored-By: Alexander Bantyev <alexander.bantyev@tweag.io>
This commit is contained in:
Silvan Mosberger
2025-10-11 02:24:46 +02:00
parent ff336e2ecd
commit c0c6684257
3 changed files with 175 additions and 0 deletions

View File

@@ -83,4 +83,16 @@ program
}
})
program
.command('get-teams')
.description('Fetch the list of teams with GitHub and output it to a file')
.argument('<owner>', 'Owner of the GitHub repository to label (Example: NixOS)')
.argument('<repo>', 'Name of the GitHub repository to label (Example: nixpkgs)')
.argument('[outFile]', 'Path to the output file (Example: github-teams.json). If not set, prints to stdout')
.action(async (owner, repo, outFile, options) => {
const getTeams = (await import('./get-teams.js')).default
// TODO: Refactor this file so we don't need to pass a PR
await run(getTeams, owner, repo, undefined, { ...options, outFile })
})
await program.parse()