Skip to content

Commit

Permalink
chore(scripts): set repository for gh commands (#4458)
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts authored Feb 17, 2025
1 parent 160062c commit 4108277
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions scripts/ci/codegen/pushToRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
const pathToSpecs = toAbsolutePath(`${tempGitDir}/${spec.output}`);
Expand Down Expand Up @@ -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}`);
Expand Down

0 comments on commit 4108277

Please sign in to comment.