Skip to content

When updating reviewers from the reviewer panel, approval rule information included in changes payload

Problem to Solve

Discovered when working on !209194 (merged). The changes section of the merge request webhook payload always includes approval rule information when reviewers are updated from the enhanced reviewer sidebar.

"changes": {
    "approval_rules": {
      "previous": [],
      "current": [
        {
          "id": 1,
          "approvals_required": 0,
          "name": "All Members",
          "rule_type": "any_approver",
          "report_type": null,
          "merge_request_id": 37,
          "section": null,
          "modified_from_project_rule": false,
          "orchestration_policy_idx": null,
          "vulnerabilities_allowed": 0,
          "scanners": [],
          "severity_levels": [],
          "vulnerability_states": [
            "new_needs_triage",
            "new_dismissed"
          ],
          "security_orchestration_policy_configuration_id": null,
          "scan_result_policy_id": null,
          "applicable_post_merge": null,
          "project_id": 2,
          "approval_policy_rule_id": null,
          "updated_at": "2025-10-16 18:41:57 UTC",
          "created_at": "2025-10-16 18:41:57 UTC"
        }
      ]
    },

Proposal

Approval rule information should only be in the changes section when approval rules are actually changed on the merge request.

Edited by Kai Armstrong