You need at least ‘reporter’ role in the GitLab project to be able to see the list of merge requests (MR) and at least ‘developer’ role to be able to open a MR.
If you or your colleague
have already opened
a
Merge Request (MR)
,
you can have discussions with your colleagues regarding that MR.
If you have a concern, add a comment, or if your colleagues have done so, revise comments.
The GitLab page of MRs is divided into 4 pages, that you can find beneath the title of the MR:
You can either add general comments or add comments tied to specific lines.
If you are on the ‘Changes’ page, you could click Start a review
.
This allows you to write and submit multiple comments at the same time.
Stick to Add comment now
, at least in the beginning.
On the bottom of the ‘Overview’ page (1
) of the MR, you can add general comments and revise other people’s actions.
If you want to start a general
thread
,
write your comment (2
) then click on the arrow on the Comment
button (3
) and select the option Start Thread
.
To discuss specific aspects, go to the page ‘Changes’ (1
).
Comment on specific lines (2
and 3
) and start a thread (4
) thereby.
Optionally you can insert a suggestion.
A suggestion is a specific change and can be applied by your colleague in the GitLab web interface by one click.
See this and the screenshot in step 3, where the suggestion was to insert the word new
.
Create the syntax by clicking the marked icon (1
) from the editing tools and adopting the suggestion (2
) to your needs.
When you are done with your comments and suggestions, go to the ‘Overview’ page and have a look at the overall MR and if your threads are displayed as expected:
(1
) is a general comment.
(2
) is a thread on a specific line.
(3
) is a suggestion within (2
) and would get applied by clicking (4
).
On the top of the ‘Overview’ page (1
) of every MR you can see if there are any unresolved threads (2
).
(Also you can edit the MR or mark it as ready (3
).)
Act on unresolved threads.
Generally speaking there are different options:
3
) by clicking Apply suggestion
(4
).1
). In many cases it is probably a good idea, to give the reasons for this in your comment (Step 2).Comment
In most cases you should write an answer to the feedback you received.
Depending on the feedback you can say ‘Thank you’ or discuss the matter of the thread.
Type your comment to (2
) in the field Reply...
(5
).
You can mention the commit in a comment of the thread simply by writing its commit id, e.g. 92d2230d
, you can mention issues with a preceding #
, e.g. #22
and you can mention MRs with a preceding !
, e.g. !13
.
See the general documentation on GitLab for the GitLab-specific Markdown.
Resolve
Mark a thread as done by clicking Resolve thread
(6
).
Repeat the previous steps until all threads are closed.
The MR should look like this:
Now you might be ready to close the MR.