Skip to content

Handle all approval messages in merge chat message

What does this MR do?

!8742 (merged) added additional merge request approval event actions to webhooks, but the new actions were not added to the chat message handler. As a result, the chat message would display the state of the merge request when one of the new events occurred, which would produce a misleading message that the approver had opened the merge request. It also looks like an existing action unapproved already existed, and this was never handled appropriately either.

This change adds support for unapproved, and adds additional support for approval and unapproval. Since the returned text needs to be an action undertaken by a user, the latter two are translated to more complex text to ensure the resulting message makes sense. I'd appreciate input on the resulting text of all four actions.

I'd also like some input on whether this is the right place to be changing the text: should standard action names instead be decided at the point where they're published?

Does this MR meet the acceptance criteria?

Conformity

Closes #11495 (closed)

Merge request reports