Improving Gitlab review process
2 min readNov 22, 2024
We were missing two essential features in the Gitlab review process:
- Commits to a running merge request are difficult to assign to a thread
- Commits to a running merge request that add new code are potentially overlooked during a review
To avoid the problems arising from the above points, we have decided to use a web hook to create the desired features based on the commit message.
How does it work?
- copy a note URL from the thread you want to solve (hover over the time when note was created — should look like this: http://gitlab.internal:8080/group1/project1/-/merge_requests/123#note_54321)
- mention users like @gitlabuser
Just add them to your commit message like:
my commit message
http://gitlab.internal:8080/group1/project1/-/merge_requests/123#note_54321
@gitlabuser
Result:
New comment extending the running thread / discussion and actively informing people without opening the Gitlab GUI.
In case you are pushing to a branch with open merge request and no note URLs, a new thread / discussion will be opened and must be solved.
Examples using my local development environment and API key of admin user:
Extend a thread:
New thread including mention of myself:
Enjoy!