We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19a9fd4 commit 7bac92dCopy full SHA for 7bac92d
src/utils.js
@@ -1,5 +1,6 @@
1
const Promise = require('bluebird')
2
const { getGitBranch } = require('./git-api')
3
+const debug = require('debug')('commit-info')
4
5
function firstFoundValue (keys, object = process.env) {
6
const found = keys.find(key => {
@@ -20,8 +21,11 @@ function getBranch (pathToRepo) {
20
21
]
22
const ciBranch = firstFoundValue(ciNames, process.env)
23
if (ciBranch) {
24
+ debug('found branch %s from CI variable', ciBranch)
25
return Promise.resolve(ciBranch)
26
}
27
+ debug('could not find branch from CI variables')
28
+ debug('using Git tool to find branch')
29
return getGitBranch(pathToRepo)
30
31
0 commit comments