Allow PR reviewers to comment on and suggest changes to unedited lines of code #4452
Replies: 73 comments 72 replies
-
Relevant. isaacs/github#1655 |
Beta Was this translation helpful? Give feedback.
-
Yeah, hardly a day goes by that I don't want to comment on some line but the GitHub UI is like "nope, if you want to talk about that line go write out in English |
Beta Was this translation helpful? Give feedback.
-
How is this not a thing already? GitHub PRs are by far the worst code review tool I've ever used. This would make it a tiny bit better. |
Beta Was this translation helpful? Give feedback.
-
I just needed this feature today, I wanted to point out something that is related to the change but not part of it. |
Beta Was this translation helpful? Give feedback.
-
I also needed this feature today in order to comment on some code not changed by the PR but relevant to the PR's changes. |
Beta Was this translation helpful? Give feedback.
-
I'd think that it's a problem to do because code suggestions need to be retained, even as "outdated", even after PR author pushes more commits or even rebases and force-pushes the branch. Probably comments are linked to specific lines in the unified patch of the PR. |
Beta Was this translation helpful? Give feedback.
-
Completely bizarre that this is not possible. Case in point: a PR refactors a file from JS to TS. If a line has not been refactored and therefore changed, how do I point it out to the dev?? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the feedback. We understand the need and are investigating the feasibility this quarter. 2021-12-19 update: Commenting on any line of a file changed in the pull request is on the roadmap for next quarter: github/roadmap#347. Please use #9099 to discuss commenting on unchanged files. |
Beta Was this translation helpful? Give feedback.
-
++ |
Beta Was this translation helpful? Give feedback.
-
One of my favorite changes to GitHub's PR review experience was the introduction of suggested changes. I regularly use this feature in documentation PRs; suggesting changes really helps speed up the review cycle by allowing me to prepare a necessary change and allowing the PR creator to review and accept it rather than me commenting how we should modify the text. A major drawback to the current implementation, though, is that the GitHub UI does not allow reviewers to suggest changes to lines that are not directly affected by the PR. Hovering over a line in right next to changed lines gives an 'add line comment' button Hovering over a line that was hidden behind the "Expand up" or "Expand down" buttons does not display an 'add line comment' button Please allow reviewers to comment on and suggest changes to any line in the files under review. Replies Arcanorum image 0 replies davisking 0 replies ChJones-IDM 0 replies ayyadalaa 0 replies star-square 0 replies codesnik 0 replies whenmoon 0 replies willsmythe 8 replies @swythan Think "Security Linter" where one config change might cause another part of the configuration to become invalid (or to need a warning about the possibly unexpected cascaded change). @willsmythe I created a new discussion specifically about commenting on unchanged files: #9099. Please add any additional comments there (and upvote if this is something you need). @swythan - can you create a new discussion for your request about review bots and annotations? It wasn't clear if you were asking that unmodified, annotated files just be visible in the Files Changed tab, or for also allowing users to comment on them. @swythan I'll forward this to the team that was trying to do this. @AndrewMonteith @LittleHuman1 Write a reply |
Beta Was this translation helpful? Give feedback.
-
How can we tell the progress of github/roadmap#347, since Q1 is over and it is not possible still, just wondering if there is status somewhere, has it been started or not, almost done, done but waiting for official release, etc. |
Beta Was this translation helpful? Give feedback.
-
Github is really disappointing compared to Gitlabs. And they're supposed to be the originators. |
Beta Was this translation helpful? Give feedback.
-
@jeffsaremi don't lose your hope on them man |
Beta Was this translation helpful? Give feedback.
-
Upvoted. This would be incredibly useful. |
Beta Was this translation helpful? Give feedback.
-
+1 |
Beta Was this translation helpful? Give feedback.
-
Any progress on this? |
Beta Was this translation helpful? Give feedback.
-
Yes Please! When PRing a file that was updated, it would be so much nicer to just say oh hey you forgot to update this line too. |
Beta Was this translation helpful? Give feedback.
-
2000 upvotes later... any progress updates would be appreciated! |
Beta Was this translation helpful? Give feedback.
-
Github, I will name one of my cats Octocat if you add this, please 🐙 |
Beta Was this translation helpful? Give feedback.
-
Commenting from February 2025 when this feature still hasn't been implemented. Come on github. You can do it. |
Beta Was this translation helpful? Give feedback.
-
Basic feature missing! |
Beta Was this translation helpful? Give feedback.
-
I have needed to provide suggestions on unchanged lines several times (including just now)... but have to opt for the less-specific file-level comment. This feature would be very, very appreciated! |
Beta Was this translation helpful? Give feedback.
-
I just found myself needing this feature for the 1000th time today :) |
Beta Was this translation helpful? Give feedback.
-
Between this issue and the original it looks like this problem has over 3000 upvotes, making it the top thing your customers want solved. |
Beta Was this translation helpful? Give feedback.
-
I just did a review where this ended up being an issue multiple times. It's so frustrating to not be able to provide proper feedback when the line I want to comment on is right there, but just out of reach! Sorry for venting my frustration. :) |
Beta Was this translation helpful? Give feedback.
-
FWIW, here’s a simple hack I follow: I select multiple lines in the file (even if they are not part of the current PR). When you select lines, the URL in the browser updates to include the selected line numbers. If you copy this URL and open it in another tab, you'll see the selected lines highlighted. You can copy this URL and put in comment section of that particular file. |
Beta Was this translation helpful? Give feedback.
-
This is an important issue that many including myself have been thinking about for quite a long time. Today I came across a conflict that made me ask the following question: In what scenarios is the motivation behind the request for this feature not addressed by simply stacking another PR onto the source branch of the PR you're reviewing (even if it's an open source project and you're actually stacking that PR from your fork onto another third-party fork)? The PR OP can then either merge your stacked PR, cherry-pick, or whatever else they want but you both get a proper patch diff and you can of course edit anything in the stacked branch and then (perma)link to the proposed changes in your review comments. Apologies if this has already been proposed above and I missed it. |
Beta Was this translation helpful? Give feedback.
This comment was marked as spam.
This comment was marked as spam.
-
Yet another missing GitHub feature in the core code review product that Gerrit has long supported for over a decade. |
Beta Was this translation helpful? Give feedback.
-
+1, ReviewBoard has this feature, its very useful |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
One of my favorite changes to GitHub's PR review experience was the introduction of suggested changes. I regularly use this feature in documentation PRs; suggesting changes really helps speed up the review cycle by allowing me to prepare a necessary change and allowing the PR creator to review and accept it rather than me commenting how we should modify the text.
A major drawback to the current implementation, though, is that the GitHub UI does not allow reviewers to suggest changes to lines that are not directly affected by the PR.
Hovering over a line in right next to changed lines gives an 'add line comment' button

Hovering over a line that was hidden behind the "Expand up" or "Expand down" buttons does not display an 'add line comment' button

Please allow reviewers to comment on and suggest changes to any line in the files under review.
July 14, 2023 update: Unmarked @willsmythe's comment as an answer to this request as github/roadmap#347 is still open and on the backlog.
Beta Was this translation helpful? Give feedback.
All reactions