diff --git a/scripts/ci/codegen/pushToRepository.ts b/scripts/ci/codegen/pushToRepository.ts index d4c9d26b3fc..e7b10e8ba7e 100644 --- a/scripts/ci/codegen/pushToRepository.ts +++ b/scripts/ci/codegen/pushToRepository.ts @@ -20,7 +20,6 @@ import { pushToRepositoryConfiguration } from './types.ts'; import { getClientsConfigField } from '../../config.ts'; import { commitStartRelease } from './text.ts'; -import { sleep } from './waitForAllReleases.ts'; async function handleSpecFiles(spec: SpecsToPush, tempGitDir: string): Promise { const pathToSpecs = toAbsolutePath(`${tempGitDir}/${spec.output}`); @@ -159,10 +158,8 @@ async function pushToRepository(repository: string, config: RepositoryConfigurat head: task.prBranch, }); - // the graphql api of gh might have some cache so we need to wait a bit - await sleep(10_000); - - await run(`gh pr merge ${data.number} --auto`); + await run(`gh auth login --with-token ${ensureGitHubToken()}`); + await run(`gh --repo ${OWNER}/${repository} pr merge ${data.number} --auto`); console.log(`Pull request created on ${OWNER}/${repository}`); console.log(` > ${data.url}`);