matrix-org / matrix-org/matrix-hookshot

How should GitLab note updates be handled?

Open
#958 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
450
Forks
95
Avg merge
1d 2h
Merged PRs (30d)
23

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by locating the GitLab webhook handling for note creation and note updates, then determine whether edits should use replacement relations or be ignored; done requires an agreed behavior for edited notes and coverage for that decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
gitlab, typescript
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.