Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions batch/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,33 @@ const report = command(
},
)

const backfillInstallationMembership = command(
{
name: 'backfill-installation-membership',
parameters: ['[organization id]'],
flags: {
dryRun: {
type: Boolean,
description:
'Print the planned changes without writing to the database',
default: false,
},
},
help: {
description:
'One-shot migration: assign github_installation_id to repositories and seed memberships for orgs whose GitHub App method has exactly one active installation. Run before deploying PR 7 strict lookup.',
},
},
async (argv) => {
const { backfillInstallationMembershipCommand } =
await import('./commands/backfill-installation-membership')
await backfillInstallationMembershipCommand({
organizationId: argv._.organizationId,
dryRun: argv.flags.dryRun,
})
},
)

const reassignBrokenRepositories = command(
{
name: 'reassign-broken-repositories',
Expand Down Expand Up @@ -184,6 +211,7 @@ cli({
classify,
backfill,
report,
backfillInstallationMembership,
reassignBrokenRepositories,
],
})
Loading
Loading