Skip to content

Commit 4108277

Browse files
authored
chore(scripts): set repository for gh commands (#4458)
1 parent 160062c commit 4108277

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

scripts/ci/codegen/pushToRepository.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import { pushToRepositoryConfiguration } from './types.ts';
2020

2121
import { getClientsConfigField } from '../../config.ts';
2222
import { commitStartRelease } from './text.ts';
23-
import { sleep } from './waitForAllReleases.ts';
2423

2524
async function handleSpecFiles(spec: SpecsToPush, tempGitDir: string): Promise<void> {
2625
const pathToSpecs = toAbsolutePath(`${tempGitDir}/${spec.output}`);
@@ -159,10 +158,8 @@ async function pushToRepository(repository: string, config: RepositoryConfigurat
159158
head: task.prBranch,
160159
});
161160

162-
// the graphql api of gh might have some cache so we need to wait a bit
163-
await sleep(10_000);
164-
165-
await run(`gh pr merge ${data.number} --auto`);
161+
await run(`gh auth login --with-token ${ensureGitHubToken()}`);
162+
await run(`gh --repo ${OWNER}/${repository} pr merge ${data.number} --auto`);
166163

167164
console.log(`Pull request created on ${OWNER}/${repository}`);
168165
console.log(` > ${data.url}`);

0 commit comments

Comments
 (0)