BCDevOps / nrdk

Natural Resource Ministries Developer/Deployment Kit
3 stars 4 forks source link

Provide error message when performing backlog:checkin #50

Open bferguso opened 3 years ago

bferguso commented 3 years ago

When performing a backlog:checkin without any committed changes, it fails without providing an error message explaining why. The current error message returned is:

info: Retrieving credentials from git credentential helper (osxkeychain) for 'https://bwa.nrs.gov.bc.ca/int/jira/rest/api/2/myself' {"category":"SecretManager","timestamp":"2021-01-20T22:16:04.863Z"}
expectedCurrentTrackingBranchName origin/feature/FFS-277
    TypeError: Cannot read property 'branches' of undefined
npm ERR! code 1
npm ERR! path /Users/brett/work/repo/git/ffs/tmp/ffs-ear-277
npm ERR! command failed
npm ERR! command sh -c nrdk backlog:checkin

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/brett/.npm/_logs/2021-01-20T22_16_06_778Z-debug.log

A more appropriate error message might be something like "No changes to check in."