Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-19670

Jira issue commit checker- ability to specify ignored patterns

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • Integration - JIRA
    • None
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      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.

              Unassigned Unassigned
              72f9a8a8c008 Pay Bas
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: