I'm performing a merge review (code review) in GitLab. I entered some file comments then the author responded to the comments and made some changes to the files. I can view the comment thread, and the relevant portion of the original file on the merge request Overview page. And a link there will take me to a diff between the original and changed files.
But how can I see the comment, response and file diff at the same time? Open the diff link in a new window?
GitLab version = Enterprise Edition 12.10.1-ee
(Newbie stackexchange user - Apologies for any breaches of etiquette.)
Check if GitLab 14.6 (December 2021) improves your use case:
View inline the change that outdated a merge request thread
When addressing review feedback in merge requests, you often change lines your reviewers have commented on.
In those comment threads, GitLab indicates that new changes were made.
However, to understand if those new changes address the feedback, reviewers would have to navigate away from the context of the discussion.
Now, when viewing threads related to old changes, you can view the new changes directly in the thread.
This improved context helps you review faster and more accurately.
See Documentation and Issue.
If you want to see all the merge requests, you can check that in the left panel as 'Merge request' option. If you check the particular merge request, you can see Discussion, Commits , Changes at the bottom. It will be easier here for you to check what changes has been made.
Related
First time GitLab user and I'm a bit confused when reviewing someone's merge request. Whenever I add a comment I get prompted with 2 options [Submit review] and [Add comment now].
What's the difference between the 2? Why is there a need for 2 options?
Just heard this from my colleagues, so not sure if this is 100% accurate:
Add comment now: instantly adds the comment to the review and notifies the reviewer that a comment has been added. So if you choose this option X times, the reviewer receives X notifications.
Submit review: You can add as many comments as you want in as many files as you want. If you choose this option at the end of your review, the reviewer will receive only 1 notification containing all of your comments.
An additional difference: the submit review now (Aug. 2022) comes with a summary.
See GitLab 15.3 (August 2022)
Submit merge request review with summary comment
When you finish reviewing a merge request, there are probably some common things that you do, like summarizing your review for others or approving the changes if they look good to you.
Those common tasks are now quicker and easier: when you submit your review, you can add a summary comment along with any quick actions like /approve.
See Documentation and Issue.
The scenario is as follows: A user has opened a merge request that adds a new feature to my code. Their code however contains a few bugs. I know how to fix the appropriate parts but I'd prefer keeping my repository free of code that has known issues. Therefore I'd like to modify their code before merging it.
I know I could also manually copy over the changes but I would still like to give the user that opened the merge request credit for their contribution.
You could take the user's changes (pull them over to your development environment) using Git, and then add your changes, and then merge the lot -- this way your user's commits are visible, and your commits are visible.
You could also add your user to a CREDITS file to give them credit as a contributor.
You could also ask the user to fix the bugs (which helps the user too, to learn how to improve their code) and then merge the change.
What is the easiest/best way to review a merge request in gitlab for a branch that has many commits?
Is there a “unified” view I can use somehow or is the only option to click on the “Changes” tab and go through each individual commits one by one?
You do not need to go through each invidividual commit one by one.
You should click on the Merge Request's "Changes" tab, instead of the "Changes" tab of individual commits, so you see the changes between the latest version and the branch you want to merge into, e.g. with Master:
This way, you will see all changes that are proposed within the merge request and you can review them all at once.
Since the last update of our self-hosted gitlab component, the assignee changes are not logged anymore on any merge request.
Just like so : (taken from Gitlab documentation)
Not only it allows to see the exact workflow but it can also gives informations on the timeline of these changes. All these were very helpfull.
I've searched in the changelog but it dosen't seem to be listed.
Here is my question :
Is it possible go get it back and if so, how ?
Thanks a lot in advance
You have probably hidden the activities. At the beginning of the events, where there are tabs for Discussion, Pipelines, Commits, and Changes, there is a dropdown where you can filter out some activities. You just need to select "Show all activity", or whatever fits you best
edit: Clarified that comments are in the context of a merge requests.
screen shot: available icons on right of one of my merge request comments
This screenshot shows a fragment of a merge request comment (not publicly available) that I wrote, note lack of vertical "three dots" on right as shown in Sakura's screen short below. My just shows a pencil for editing.
I want to reference arbitrary discussion comments on some source code in merge requests.
edit: generalized my "my comments I created" to "general comments", added screenshot of an example from gitlab:
screen shot: example comment from publicly accessible gitlab merge request #523
Here is a publicly visible merge request at gitlab.com, I just chose this merge request at random because it had a fair number of comments. I chose this particular comment more or less randomly, and because the associated code fragment was short.
If you search that merge request for this text you'll find a discussion matching the above comment.
Toon Claes OOO
#toon started a discussion on an old version of the diff 1 month ago
Resolved by Toon Claes OOO 1 month ago
Original description:
Let me explain what I mean by link.
Gitlab sends me an email when other people make discussion comments, like
this example from a merge request discussion:
(i) | Samantha Q. commented on a discussion about a/b/c/foo.py:
| 123 - # some ugly code
| 123 + # some cleaner code
| Some insightful comment here.
The a/b/c/foo.py in (i) above is a hyperlink like this:
a/b/c/foo.py
Which is sort of ok for comments other people write, because I can copy the link from the email (assuming I still have it). But I don't see a way to get this kind of link from discussion comments anybody wrote (originally emphasized comments that I wrote).
Can you tell me how to get a link like (i) from the gitlab user interface?
workaround: I can manually hack up a link by digging the note id #note_18536 part out of view source, but that seems harder than it needs to be.
edit: also, this work around doesn't appear to work on possibly newer version of gitlab becuase when I go to search for the comment in view-source I can't find it, I don't know why - maybe it is dynamically populating the page via javascript.
On gitlab, when you wrote a comment, you have a menu on the right of the comment header (see image):
On these menu, you have two options:
If you're the poster, you have the option for copy link, and delete comment.
If you aren't the poster, you can report comment, or copy link.
I think that's resolves your question.