From f5d265c74b34bf32bde2113d942972aab9f6f68e Mon Sep 17 00:00:00 2001 From: Joel Lim <56012934+joel-zilliqa@users.noreply.github.com> Date: Mon, 12 Oct 2020 20:35:29 +0800 Subject: [PATCH] Updated dist/index.js --- dist/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 8fc26dda..218d6ea0 100644 --- a/dist/index.js +++ b/dist/index.js @@ -7483,6 +7483,7 @@ async function run() { const inputs = { token: core.getInput('repo-token', {required: true}), + useBaseBranch: (core.getInput('use-base-branch').toLowerCase() === 'true'), branchRegex: core.getInput('branch-regex', {required: true}), lowercaseBranch: (core.getInput('lowercase-branch').toLowerCase() === 'true'), titleTemplate: core.getInput('title-template', {required: true}), @@ -7495,7 +7496,7 @@ async function run() { uppercaseBody: (core.getInput('uppercase-body').toLowerCase() === 'true'), } - const branchName = github.context.payload.pull_request.head.ref; + const branchName = inputs.useBaseBranch ? github.context.payload.pull_request.base.ref : github.context.payload.pull_request.head.ref; const branch = inputs.lowercaseBranch ? branchName.toLowerCase() : branchName; core.debug(`branch: ${branch}`); @@ -11310,4 +11311,4 @@ function onceStrict (fn) { /***/ }) -/******/ }); \ No newline at end of file +/******/ });