Closed mmatotan closed 1 year ago
Getting this error:
Run phips28/gh-action-bump-version@master process.env.GITHUB_WORKSPACE /home/runner/work/secret/secret tagPrefix: tagSuffix: commit messages: [] config words: { majorWords: [ 'BREAKING CHANGE', 'major' ], minorWords: [ 'feat', 'minor' ], patchWords: null, preReleaseWords: [ 'pre-alpha', 'pre-beta', 'pre-rc' ] } version action after first waterfall: patch version action after final decision: patch runInWorkspace | command: git args: [ 'config', 'user.name', '"Automated Version Bump"' ] runInWorkspace | command: git args: [ 'config', 'user.email', '"gh-action-bump-version@users.noreply.github.com"' ] ✖ fatal TypeError: Cannot read properties of null (reading '1') at /home/runner/work/_actions/phips[28](https://github.com/secret/secret/actions/runs/secret_number/jobs/secret_number#step:3:29)/gh-action-bump-version/master/index.js:182:75 at processTicksAndRejections (node:internal/process/task_queues:96:5) ✖ fatal Failed to bump version
If I understand correctly, this line of code fails:
currentBranch = /refs\/[a-zA-Z]+\/(.*)/.exec(process.env.GITHUB_REF)[1];
And in the case of a deployment event the process.env.GITHUB_REF is null and hence the whole regex throws an error that there is no [1] of null. I will open a PR to optionally select the second element in the array.
process.env.GITHUB_REF
[1]
Getting this error:
If I understand correctly, this line of code fails:
And in the case of a deployment event the
process.env.GITHUB_REF
is null and hence the whole regex throws an error that there is no[1]
of null. I will open a PR to optionally select the second element in the array.