Skip to content

Draft: Merge Request webhook event: add 'target_branch' to 'changes'

What does this MR do and why?

Merge Request webhook event: add 'target_branch' to 'changes'

It is nice to clearly see from an event when an MR's target branch has changed. Add it to the 'changes' mapping when it is changed.

Changelog: added

Signed-off-by: Patrick Talbert ptalbert@redhat.com

Screenshots or screen recordings

Currently the 'changes' mapping for a merge request webhook event shows only this when the MR's target branch changes, presumably the 'previous' value could be other things:

  "changes": {
    "merge_status": {
      "previous": "can_be_merged",
      "current": "unchecked"
    }
  },

With this change, the event would instead be crystal clear:

  "changes": {
    "target_branch": {
      "previous": "test",
      "current": "main"
    },
    "merge_status": {
      "previous": "can_be_merged",
      "current": "unchecked"
    }
  },

How to set up and validate locally

N/A

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports