Skip to content

Commit

Permalink
fix: try to merge the upstream repo branch on the fork
Browse files Browse the repository at this point in the history
  • Loading branch information
chingor13 committed Feb 22, 2022
1 parent 1f3edc4 commit a9708d9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,18 @@ async function createPullRequest(
};
const origin: RepoDomain =
options.fork === false ? upstream : await fork(octokit, upstream);
if (options.fork) {
// try to sync the fork
await retry(
async () => {
await octokit.repos.mergeUpstream({
owner: upstream.owner,
repo: upstream.repo,
branch: gitHubConfigs.primary,
})
}
);
}
const originBranch: BranchDomain = {
...origin,
branch: gitHubConfigs.branch,
Expand Down

0 comments on commit a9708d9

Please sign in to comment.