Since 14.8 Gitlab sends 'update' action Webhook when resolving thread in a Merge Request.
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
I use a webhook mechanism to verify the content of Merge Request. Since version 14.8 of Gitlab, my application started to loop itself since the application was using API to create a discussion and resolves it automatically if Merge Request passes the tests.
According to the documentation, since 14.8 you also send the object_attributes.action = 'update' Webhook when the thread is resolved. However, there is no proper information/field to differentiate the reason, whether the code has changed or the thread was resolved.
Steps to reproduce
- Create a Merge Request webhook.
- Create a new Merge Request.
- You will receive the first Webhook request.
- Create and resolve the thread on MR.
- You will receive a second Webhook request.
What is the current bug behavior?
You will receive 2 identical HTTP requests from Webhook.
What is the expected correct behavior?
You should receive 2 different HTTP requests from Webhook and be able to know what action was behind the request.
Output of checks
This bug happens on GitLab.com
Possible fixes
Another action type, in v 14.8 you currently have
- open
- close
- reopen
- update
- approved (this is Approve button on Merge Request)
- unapproved
- merge
Maybe you should have another action type related to threads (resolved, unresolved).