Skip to content

Commit

Permalink
Add some more logging (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
job13er authored Jul 9, 2019
1 parent e80fed3 commit 87f724c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/bumpr.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ class Bumpr {
* Check if a build is happening in a PR
*/
isPr() {
return this.config.computed.ci.isPr
const {isPr} = this.config.computed.ci
Logger.log(`This build is${isPr ? '' : ' not'} a PR`)
return isPr
}

/**
Expand Down Expand Up @@ -225,6 +227,7 @@ class Bumpr {
* @returns {PrPromise} a promise resolved with the most recent PR
*/
getLastPr(numExtraCommits) {
Logger.log(`Getting last PR: numExtraCommits = ${numExtraCommits}`)
return exec(`git rev-list HEAD --max-count=1 --skip=${numExtraCommits}`).then(stdout => {
const sha = stdout.trim()
Logger.log(`Fetching PR for sha [${sha}]`)
Expand All @@ -238,6 +241,7 @@ class Bumpr {
* @returns {Promise} a promise - resolved with PR info (changelog and scope) or rejected on error
*/
getMergedPrInfo(numExtraCommits) {
Logger.log(`Getting merged PR info: numExtraCommits = ${numExtraCommits}`)
return this.getLastPr(numExtraCommits).then(pr => {
let maxScope = 'major'
if (this.config.isEnabled('maxScope')) {
Expand Down

0 comments on commit 87f724c

Please sign in to comment.