PR multiline review #23002
-
Hi! Sorry for probably a silly question, but is there a way to select multiple lines while reviewing a pull request? Currently I can only see a blur plus sign which selects only one line. Thanks, Alex |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
Hi @alexbagirov, At this time, there is not a way to highlight multiple lines to add a comment on a Pull Request review. However, you can select multiple lines when looking at the file on the branch that the Pull Request is based on and then select Copy Permalink which will give you a link to those selected lines as you can see here: Then when you copy that link into a review comment, it will be rendered as those lines of code. That way, you can comment beneath the relevant place in the code but still indicate all of the lines you’re referring to. Does that help? |
Beta Was this translation helpful? Give feedback.
-
Will this continue working if you delete branch after merge? |
Beta Was this translation helpful? Give feedback.
-
Hi @llamerr, Yes, the link will still work after the branch is deleted. Thanks! |
Beta Was this translation helpful? Give feedback.
-
What about a whole new file? How can I do it there? I cannot see the |
Beta Was this translation helpful? Give feedback.
-
this may be a dumb question but, how do I select multiple lines? |
Beta Was this translation helpful? Give feedback.
-
When in diff vew, click the ‘…’ in the right hand corner of a file and choose ‘View file’. This will open that file in the new branch. Then click on the first line you want to select, hold shift and click on the last line. Then copy-paste the whole url into your comment on the PR, or press the ‘…’ by the first selected line and choose ‘Copy permalink’. |
Beta Was this translation helpful? Give feedback.
-
Good news: github has just launched the feature. Now you can highlight multiple lines in a pull request diff and add a comment, all at once. |
Beta Was this translation helpful? Give feedback.
Hi @alexbagirov,
At this time, there is not a way to highlight multiple lines to add a comment on a Pull Request review. However, you can select multiple lines when looking at the file on the branch that the Pull Request is based on and then select Copy Permalink which will give you a link to those selected lines as you can see here:
Then when you copy that link into a review comment, it will be rendered as those lines of code. That way, you can comment beneath the relevant place in the code but still indicate all of the lines you’re referring to.
Does that help?