[go: up one dir, main page]

Skip to content

Support multiple targets for a merge request approval rule

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Enhance Merge Request Approval Rules to Support Multiple Branch Wildcards

Problem Statement

Currently, in the Settings > Merge requests > Merge requests approvals table, rules can be added that target "all branches", "all protected branches", or any single branch or wildcard marked as protected in Settings > Repository > Protected branches. However, if a rule needs to apply to multiple specific branch wildcards (e.g., both int/* and INT/*), separate rules must be created and manually kept in sync. This limitation:

  1. Increases the workload on DevOps teams
  2. Introduces potential for human error in rule management
  3. Complicates the process of maintaining consistent approval rules across multiple branch patterns

Proposed Solution

Implement a feature that allows a single merge request approval rule to apply to multiple branch wildcards via a multi-select option in the rule creation/editing interface.

Benefits

  1. Reduced Workload: DevOps teams will spend less time creating and managing approval rules
  2. Improved Consistency: Reduced risk of discrepancies between rules for similar branch patterns
  3. Enhanced Flexibility: Easier to implement and modify complex approval strategies
  4. Simplified Automation: Reduce the need for external automation tools (e.g., OpenTofu), simplifying the overall workflow

Acceptance Criteria

  1. Users can create a single merge request approval rule that applies to multiple branch wildcards
  2. The UI for creating/editing rules clearly shows which branch patterns are included in each rule
  3. Existing rules can be modified to include additional branch patterns without creating duplicates
  4. The system correctly applies the rule to all specified branch patterns
  5. Performance impact of applying rules to multiple patterns is negligible
  6. API endpoints for managing merge request approval rules support the new multi-pattern functionality
  7. Documentation is updated to reflect the new feature and its usage
  8. Backward compatibility is maintained for existing single-pattern rules

This description was generated using AI from a human written summary and was edited before submission.

Edited by 🤖 GitLab Bot 🤖