How to tell a merge request webhook is from reassigning a merge request?

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

  • Close this issue

Merge request webhooks are great. I use them to trigger try builds. Since the webhook is fired whenever the merge request changes in any way, I have to filter out most of those events to avoid spurious/duplicate builds.

When a merge request is reassigned, I don't want to do a try build. Unfortunately, I don't know how to filter out those events.

Here's my simple filter at the moment (after slurping the event into a variable 'o'):

    if o['state'] == 'closed' or o['state'] == 'merged':
        print("skipping closed/merged merge request")
        return
    if o['merge_status'] == 'cannot_be_merged':
        print("merge request cannot be merged")
        return

If it passes that, I do a build. Is there a simple element of the merge request message I can test to see that it's a rename? Otherwise I have to keep state, which I'd rather not do.

Edited Jun 19, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading