Skip to content

Enforcing JIRA IDs in Commits and Merge Requests

Linking code changes to JIRA issues helps track work and improves auditability.

  1. Navigate to Settings > Repository > Push Rules.
  2. In Commit message must match this regular expression, enter a pattern that includes your JIRA project key, e.g.,
    ^[A-Z]+-\d+: .+
  3. Save the rule. Commits without a JIRA ID will be rejected.
  • Use merge request templates that remind contributors to include JIRA-123 in the title or description.
  • Combine with approval rules so Maintainers verify the JIRA link before approving.
  • Educate developers on the required format.
  • Provide scripts or commit templates to insert the issue ID automatically.
  • Use branch naming conventions like feature/JIRA-123-description.