Skip to content

Implementation: Backend support for blocking MR being merged without JIRA issue association

Why are we doing this work

Add backend support for blocking MR being merged without an associated JIRA issue.

Non-functional requirements

  • Documentation: NA
  • Feature flag: issue_association_on_merge_request
  • Performance:
  • Testing: Make sure MR mergability behaves with and without feature flag

Implementation plan

  • Block ability to merge in-app (using MergeRequestPolicy) when
    • Feature flag is enabled, and
    • Project has Jira integration, and
    • Project has Jira issue merge check, and
    • MR does not have associated issues
  • Block ability to merge in API

Technical notes

  • Service to handle mergeability check
graph LR
  subgraph Save
    A[Change title/description] --> B[Store title/description]
  end
  B --> DB(DB)
  DB -->  C[Parse title/description]:::change   
  subgraph Read  
    C --> D[Present mergeability]:::change
  end

classDef change fill:#ffa401;

🔸 changes introduced by this issue

Edited by Tan Le