Closed aspcanada closed 4 years ago
I have a fix for this...
Simply replace .branch
> if .branch then .branch else "" end
on line 73 of notify.yml
src/commands/notify.yml:73
ISSUE_KEYS=$(cat /tmp/job_info.json | jq '[.all_commit_details[].subject | scan("(<<parameters.issue_regexp>>)") | .[] ] + [.all_commit_details[].branch | scan("(<<parameters.issue_regexp>>)") | .[] ] + [if .branch then .branch else "" end | scan("(<<parameters.issue_regexp>>)") | .[] ]')
@eddiewebb, I can open a PR is you'd like...
@aspcanada It would be wonderful if you could open a PR for this, thank you! (cc @KyleTryon @eddiewebb )
Hey all, taking a look today. @aspcanada thank you for the assistance. We will update this by end of day and report back here.
I ran into this today as well; one thing I observed in troubleshooting this, is that, as this is a tag, there is no commit/branch/pr information to derive an Issue ID from (from the API response); as such, if the vcs_tag is populated in the job json response, why not just skip pinging Jira at all and exit early with something that exits 0 and mentions as much
Orb version
1.1.2
What happened
When building a git tag in Circle, there is no branch. In the /tmp/job_info.json, the branch key is null.
"branch": null,
Expected behavior
orb should fail gracefully upon not finding any ISSUE_KEYS