diff --git a/scripts/deploy/deploy.js b/scripts/deploy/deploy.js index 29fcc01fdb..3a4f67b641 100644 --- a/scripts/deploy/deploy.js +++ b/scripts/deploy/deploy.js @@ -1,7 +1,7 @@ 'use strict' const { printLog, runMain } = require('../lib/executionUtils') -const { fetchPR, getLocalBranch } = require('../lib/gitUtils') +const { fetchPR, LOCAL_BRANCH } = require('../lib/gitUtils') const { command } = require('../lib/command') const { @@ -50,7 +50,7 @@ async function main(env, version, uploadPathTypes) { for (const uploadPathType of uploadPathTypes) { let uploadPath if (uploadPathType === 'pull-request') { - const pr = await fetchPR(getLocalBranch()) + const pr = await fetchPR(LOCAL_BRANCH) if (!pr) { console.log('No pull requests found for the branch') return diff --git a/scripts/lib/gitUtils.js b/scripts/lib/gitUtils.js index 65a0d1bb75..1be29186a1 100644 --- a/scripts/lib/gitUtils.js +++ b/scripts/lib/gitUtils.js @@ -52,5 +52,5 @@ module.exports = { initGitConfig, fetchPR, getLastCommonCommit, - getLocalBranch: () => process.env.CI_COMMIT_REF_NAME, + LOCAL_BRANCH: process.env.CI_COMMIT_REF_NAME, }