Allow PR reviewers to comment on and suggest changes to unedited lines of code #4452
Replies: 58 comments 63 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.
-
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.
-
It seems like the best place to push for this is https://github.com/orgs/community/discussions/9099 |
Beta Was this translation helpful? Give feedback.
-
Been using this for ages in Azure DevOps. |
Beta Was this translation helpful? Give feedback.
-
I want to share a workaround that may work for someone. While this is far from being ideal and doesn't work for all use cases, it's kind of okay if you're building some kind of automation and all you want is to suggest code changes in another file using the API. TLDR: It works in reverse of the code-suggesting feature. First, you commit the changes and then give the user the opportunity to automatically revert them. Here are the steps:
Again, it is very, very far from the ideal solution but it can work for someone who wants to automate code suggestions that have a high chance of being accepted (e.g., automatic code updates). |
Beta Was this translation helpful? Give feedback.
-
Any progress on this? I find GitHub to be a good code-review and collaboration platform, and this feature would be incredibly helpful! |
Beta Was this translation helpful? Give feedback.
-
waiting for updates on that :) |
Beta Was this translation helpful? Give feedback.
-
Sometime we need to point out to a fellow developer where he needs to do the change, and not allowing us to comment on those specific lines because they were not modified is annoying. |
Beta Was this translation helpful? Give feedback.
-
Unfortunate that this is still an issue after almost three years. Seems such an easy fix to activate. Don't see how there is a technical blocker for this. If there is, would be good to verbalize why. |
Beta Was this translation helpful? Give feedback.
-
How on earth is this still not a thing?? |
Beta Was this translation helpful? Give feedback.
-
In the GitHub Advanced Security video they're able to create a ````suggestion` with "Outside changed files" targeting line 16 of package.json in GitHub comments. I'd love to know how this is done. |
Beta Was this translation helpful? Give feedback.
-
Does anyone at Github read these feature requests? Has Github ever implemented a new requested feature? |
Beta Was this translation helpful? Give feedback.
-
Dear Github team just remove the if condition that not allowing to add comments on unedited lines. It's creating a pain 😭 |
Beta Was this translation helpful? Give feedback.
-
Any update on this? It would be really helpful. |
Beta Was this translation helpful? Give feedback.
-
Still waiting for this option |
Beta Was this translation helpful? Give feedback.
-
I too would love to see this feature. My company just switched over to GitHub and I was shocked to see something so fundamental just not be possible, and it hurts my ability to give proper feedback. Please consider it! |
Beta Was this translation helpful? Give feedback.
-
i am at KubeCon India New Delhi. Brought this discussion thread to the attention of the folks manning the Github kiosk. So as a community can we come up with a dollar value for this? showing how much we need this for code reviews? Enough arguments have already been added to this thread, perhaps a $$ value will do the trick. |
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.
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