diff --git a/pr-checks/sync-checks.ts b/pr-checks/sync-checks.ts index b1b2a8dd5..e7226914a 100755 --- a/pr-checks/sync-checks.ts +++ b/pr-checks/sync-checks.ts @@ -136,6 +136,8 @@ async function updateBranch( branch: string, checkNames: Set, ) { + console.info(`Updating '${branch}'...`); + // Query the current set of required checks for this branch. const currentContexts = await client.rest.repos.getAllStatusCheckContexts({ ...codeqlActionRepo, @@ -209,6 +211,9 @@ async function main(): Promise { const checkInfos = await getChecksFor(client, options.ref); const checkNames = new Set(checkInfos.map((info) => info.context)); + // Update the main branch. + await updateBranch(client, "main", checkNames); + // Retrieve the refs of the release branches. const releaseBranches = await getReleaseBranches(client); console.info( @@ -236,7 +241,6 @@ async function main(): Promise { ); continue; } else { - console.info(`Updating '${releaseBranch}'...`); await updateBranch(client, releaseBranch, checkNames); } }