Add action property to merge request hook
Created by: jubianchi
Issue hook provide a usefull information: in its JSON payload, there is the action property which gives information on what exactly happened on the issue.
With this patch, the merge request hook will provide the same information. The action property will have the following values:
-
openwhen the merge request is created -
closewhen the merge request is closed -
mergewhen the merge request is merged -
reopenwhen the merge request is reopened -
updatewhen the merge request is updated
This will let hook consumers behave differently depending on what's happening on the merge request.
For example, I'm working on a hubot scripts which will notify events on channels. Actually, I'm not able to filter notification without complex logic.