matrix-org / matrix-hookshot

A bridge between Matrix and multiple project management services, such as GitHub, GitLab and JIRA.
https://matrix-org.github.io/matrix-hookshot/
Apache License 2.0
267 stars 66 forks source link

How should GitLab note updates be handled? #958

Open zecakeh opened 1 week ago

zecakeh commented 1 week ago

GitLab has a webhook for notes "updates", i.e. when a comment in an MR or issue is edited. Currently the code doesn't make a difference when it receives a note update or a note creation, so it appears as a new comment which seems wrong.

Logically, we should use a replacement relation to edit the first message. Firstly, that would mean that we need to keep track of the event ID for every note. Secondly, given that MR review comments are batched, it becomes a bit more complicated to construct the edit. We would need to keep track of every note that was sent in an event, and probably require to fetch the other notes in the event to have the full edit content.

We could also choose the easy way out and ignore edits.