Best practice to separate code updates from other updates of a merge request in a webhook
What is the recommended way to distinguish between code updates and other updates (title, discription, assignee, labels, milestones, and so on) of a merge request in a webhook ? I'm asking because I intend to trigger another process only when the code of a MR is updated.
I notice that each time the code of a merge request is updated, namely when new commits are added, a key named oldrev
is included in the object_attributes
object in the payload received by my webhook. And when updates of other types are applied to the merge request, oldrev
is not there. However, utilizing that seems quite hacky. So I'm wondering what is the best practice to achieve my objective.