Jira issue commit checker- ability to specify ignored patterns

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Component/s: Integration - JIRA
    • None
    • 1

      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:

      1. Find all potential Jira issue references inside the commit message. Something like: `[A-Z]{2,}-[0-9]+`
      2. Filter based on some kind of list: ISO-, AES-, GMT-, SHA-, UTF-, etc.
      3. 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:

      1. 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
        1. Unacceptable for us.
      2. Add "Skip validation if the commit message contains the following terms" with "ORA-", which disables the Jira check entirely when "ORA-" is encountered
        1. Unacceptable for us.
      3. Instruct all teams that they cannot use any error/status codes such as ORA-#, CVE-#, BEA-#, INT-#, etc. in commit messages
        1. Unacceptable for us.
      4. Use the Control Freak plugin, which has solved this issue: https://bit-booster.com/hook/docs/#jiraAdvanced with the "Jira Project Blacklist".
        1. 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.

            Assignee:
            Unassigned
            Reporter:
            Pay Bas
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: