From 153407881ec5c347639a548ade7d8ad1d6740e38 Mon Sep 17 00:00:00 2001 From: Peter Evans <18365890+peter-evans@users.noreply.github.com> Date: Wed, 14 Jun 2023 10:11:08 +0900 Subject: [PATCH] fix: specify head repo (#2044) --- dist/index.js | 2 +- src/github-helper.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dist/index.js b/dist/index.js index 9cca79e352..f70d6b9194 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1071,7 +1071,7 @@ class GitHubHelper { // Try to create the pull request try { core.info(`Attempting creation of pull request`); - const { data: pull } = yield this.octokit.rest.pulls.create(Object.assign(Object.assign({}, this.parseRepository(baseRepository)), { title: inputs.title, head: headBranch, base: inputs.base, body: inputs.body, draft: inputs.draft })); + const { data: pull } = yield this.octokit.rest.pulls.create(Object.assign(Object.assign({}, this.parseRepository(baseRepository)), { title: inputs.title, head: headBranch, head_repo: headRepository, base: inputs.base, body: inputs.body, draft: inputs.draft })); core.info(`Created pull request #${pull.number} (${headBranch} => ${inputs.base})`); return { number: pull.number, diff --git a/src/github-helper.ts b/src/github-helper.ts index 663d3929e8..d1d224e0b1 100644 --- a/src/github-helper.ts +++ b/src/github-helper.ts @@ -53,6 +53,7 @@ export class GitHubHelper { ...this.parseRepository(baseRepository), title: inputs.title, head: headBranch, + head_repo: headRepository, base: inputs.base, body: inputs.body, draft: inputs.draft