-
Suggestion
-
Resolution: Unresolved
-
None
-
None
I'm not sure exactly how the "Jira issue commit checker" works, but if the "Must contain a Jira issue key that exists in Jira" option is enabled, it seems to do something like this:
- Find all potential Jira issue references inside the commit message. Something like: `[A-Z]{2,}-[0-9]+`
- Filter based on some kind of list: ISO-, AES-, GMT-, SHA-, UTF-, etc.
- Check if all remaining Jira issues are valid.
Now the problem with this is that the Jira project "filter list" (or whatever it's called internally) appears to be hard-coded and not modifiable by the project/repository owner.
So if my Jira project has project-key: JPROJECT
And I create a commit with message:
[JPROJECT-123] Fix error ORA-00060 deadlock in Oracle JDBC thingy
The push will be rejected:
remote: Commits do not meet the Jira issues requirement. remote: Check that the following Jira issues are valid and try again: remote: ORA-00060
Despite the presence of valid Jira issue reference "JPROJECT-123"
This is because "ORA-#" is not part of the hard-coded filter list. Nor can it be added. It's also not an existing Jira project in our organization.
There are currently only 4 workarounds:
- Don't use the "Must contain a Jira issue key that exists in Jira" option, but use the "Must contain a Jira issue key" option
- Unacceptable for us.
- Add "Skip validation if the commit message contains the following terms" with "ORA-", which disables the Jira check entirely when "ORA-" is encountered
- Unacceptable for us.
- Instruct all teams that they cannot use any error/status codes such as ORA-#, CVE-#, BEA-#, INT-#, etc. in commit messages
- Unacceptable for us.
- Use the Control Freak plugin, which has solved this issue: https://bit-booster.com/hook/docs/#jiraAdvanced with the "Jira Project Blacklist".
- This plugin is no longer free to use.
I feel like this is a substantial shortcoming in Bitbucket's native "Jira issue commit checker" (which is preferred above a plugin), and a pretty common use-case if you ask me.
So my request: give BB project/repo admins control over the Jira issue commit checker filter-list and allow them to change or append it.