There is an option to comment on a range of lines in file on github, see How to refer to a specific line or range of lines in github?
But is there similar option to comment on range of lines inside pull request?
When I click on line, only single line is highlighted yellow and R### (e.g. R446) is appended to url, clicking another line with shift pressed doesn't do anything. I tried to change url to R446-450 but it didn't do anything. Changing it to #L450-458 also didn't do anything. Also even that single highlighted line doesn't seem to affect anything.
Clicking blue plus that appears on hover creates comment window, but it only commenting on a single line.
Commenting on single line results in this
Comment on pull-request page shows only 4 lines above selected/commented line, but I'm interested in showing 7 lines, not 4
To add a comment on multiple lines, click and drag to select the range of lines, then click the blue comment icon. Optionally, to suggest a specific change to the line or lines, click , then edit the text within the suggestion block.
To add review comments, click the + icon next to the line number. Type your review comment and then click Start Review. When you are finished adding review comments, from the Side Bar you can choose to either submit the comments, approve the changes, or request changes.
To resolve a comment without replying, select Resolve under the comment. To reply to the comment, type your response in the Write a reply field, and select Reply. To reply to and resolve the comment, type your response in the Write a reply field, and select Reply & resolve.
Since Oct. 2019, Nat Friedman (CEO of GitHub) declares that feature available
(And, see below, since Feb. 2020, multi-lines comment reference is possible)
🔥
Multi-line comments are here!
Click and drag to comment on multiple lines in a pull request diff. ✨These little quality-of-life improvements are at the heart of what we love doing at GitHub. 🥰
Thanks to:
Nick Craver immediately asks:
Follow-up question: are there plans to support suggestions?
It seems to apply to the last line at the moment:
That would be, according to Nat, "Coming early next year".
Update Feb. 2020: "A new interaction for multi-line pull request comments "
To leave a comment referencing multiple lines, you can either:
- click on a line number in the diff view, hold Shift, click on a second line number and click the "+" button next to the second line number; or
- click and hold to the right of a line number, drag and then release the mouse when you’ve reached the desired line.
This was announced by Nat Friedman
Shipping today on GitHub: multi-line suggestions!
With, again, special thanks to Melanie Gilman, Pat Nakajima, Mike Chlipala, Joel Califa, John Caine, Matt Colyer and , and Kelly Arwine.
GitHub Changelog also references this.
Henry adds an observation
A smaller side effect, but I assume being able to share a multi-line diff in the PR is new too!
Example: babel/babel PR 10511 diff-L261-L263
But that was available since July 2019
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With