Skip to content

Commit 622882e

Browse files
ipeshevIvan Peshev
authored andcommitted
chore: change parameters
1 parent f658f25 commit 622882e

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

analyzeCommits.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const lastTaggedRelease = () => {
2424
module.exports = function (pluginConfig, config, cb) {
2525
// run standard commit analysis
2626
return analyzeCommits(pluginConfig, config, function(error, type) {
27-
const branch = config.env.TRAVIS_BRANCH || config.env.GIT_LOCAL_BRANCH || utils.ghActionsBranch(config.env.GITHUB_REF);
27+
const branch = config.env.TRAVIS_BRANCH || config.env.GIT_LOCAL_BRANCH || utils.ghActionsBranch(config.env);
2828
const branchTags = config.options.branchTags;
2929
const distTag = branchTags && branchTags[branch];
3030

getLastRelease.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = function (pluginConfig, config, cb) {
88
if (config.env.TRAVIS) {
99
branch = config.env.TRAVIS_BRANCH;
1010
} else if (config.env.GITHUB_REF) {
11-
branch = utils.ghActionsBranch(config.env.GITHUB_REF);
11+
branch = utils.ghActionsBranch(config.env);
1212
} else {
1313
branch = config.env.GIT_LOCAL_BRANCH;
1414
}

utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
let utils = {};
22

3-
utils.ghActionsBranch = branch => branch.split('/').slice(-1)[0];
3+
utils.ghActionsBranch = env => env.GITHUB_REF ? env.GITHUB_REF.split('/').slice(-1)[0] : "";
44

55
module.exports = utils;
66

verifyConditions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = function (pluginConfig, config, cb) {
99
branch = config.env.TRAVIS_BRANCH;
1010
} else if (config.env.GITHUB_REF) {
1111
defaultVerifyConditions = require('condition-github-actions');
12-
branch = utils.ghActionsBranch(config.env.GITHUB_REF);
12+
branch = utils.ghActionsBranch(config.env);
1313
} else {
1414
defaultVerifyConditions = require('@krux/condition-jenkins');
1515
branch = config.env.GIT_LOCAL_BRANCH;

0 commit comments

Comments
 (0)