Open M3t0r opened 6 years ago
I just had a chat with @andygrunwald and we settled on implementing something like a --check-one-exists
flag which will only error out if none of the found issues exist in Jira but as soon as it finds one it will os.Exit(0)
.
I'll implement this some time this week.
Given a commit message like
"ABC-123 fix missing xyz-987654321"
and two projects namedABC
andXYZ
,jitic
will find bothABC-123
andxyz-987654321
to be issues and check for their existence. Becausexyz-987654321
refers to something unrelated (in our case a database ID) and has a bigger number than there are tickets in the XYZ project the check fails and the commit is rejected by our git server.I think something like a
--first
or--only-first
flag might be a good solution to this problem. Most of our commit messages reference the ticket as the first thing.[ABC-123] fixing bug
orABC-456 implementing changes
are a common pattern. Even something likeImplementing ABC-789 to fix issues related to xyz-192837465
will still work with that.This is partially related to #4.