Skip to content

Commit beb1fe2

Browse files
committed
feat(create-pr): Avoid parameter reasign
1 parent 954312d commit beb1fe2

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

dist/440.index.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/440.index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/helpers/create-pr.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ export class CreatePR extends HelperInputs {
2828
}
2929

3030
export const createPr = async ({ title, body, head, base, return_full_payload, branch_name, commit_message }: CreatePR) => {
31-
head = await getOrCreateHeadBranch({ head, branch_name, commit_message });
31+
const resolvedHead = await getOrCreateHeadBranch({ head, branch_name, commit_message });
3232

3333
const pr_base = base || (await getDefaultBranch());
34-
await updateHeadWithBaseBranch(pr_base, head);
34+
await updateHeadWithBaseBranch(pr_base, resolvedHead);
3535
const { data } = await octokit.pulls.create({
3636
title,
37-
head,
37+
head: resolvedHead,
3838
base: pr_base,
3939
body,
4040
maintainer_can_modify: true,

0 commit comments

Comments
 (0)