Skip to content

chore(scripts): set repository for gh commands #4458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 17, 2025
Merged
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
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
Loading