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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user