Skip to content

Commit e1ee457

Browse files
committed
add repo upstream remote
1 parent 4227a5a commit e1ee457

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

dist/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37039,6 +37039,8 @@ async function updateFromSourceFlow(token, branch, autoMerge) {
3703937039
await exec.exec('git', ['add', '.'], { silent: true });
3704037040
await exec.exec('git', ['commit', '-m', 'Update API specifications with fern api update'], { silent: true });
3704137041
core.info(`Pushing changes to branch: ${branch}`);
37042+
const repoUrl = `https://x-access-token:${token}@github.com/${owner}/${repo}.git`;
37043+
await exec.exec('git', ['remote', 'set-url', 'origin', repoUrl]);
3704237044
await exec.exec('git', ['push', 'origin', branch], { silent: true });
3704337045
if (!autoMerge) {
3704437046
const octokit = github.getOctokit(token);

src/sync.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ async function updateFromSourceFlow(token: string, branch: string, autoMerge: bo
8282
await exec.exec('git', ['commit', '-m', 'Update API specifications with fern api update'], { silent: true });
8383

8484
core.info(`Pushing changes to branch: ${branch}`);
85+
const repoUrl = `https://x-access-token:${token}@github.com/${owner}/${repo}.git`;
86+
await exec.exec('git', ['remote', 'set-url', 'origin', repoUrl]);
87+
8588
await exec.exec('git', ['push', 'origin', branch], { silent: true });
8689

8790
if (!autoMerge) {

0 commit comments

Comments
 (0)