You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 18, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 18, 2021. It is now read-only.
Problem: If I rebase my pull request to track the latest master, the hashes change, so any comments on the old commits are no longer visible on the pull request. Sometimes PRs take a long time to merge, and it's very useful to be able to rebase and keep comments.
Fix option 1: When commenting on a commit currently in a pull request, that comment should be saved permanently to the pull request conversation with a message like "formerly part of this PR"
Fix option 2:
Abolish commit comments
(Optional) Allow commenting on branches before they're opened as pull requests
(Optional) Make what were previously commit comments appear as comments on every branch they're part
If it's easier: When that commit is no longer in the branch the PR tracks, show the comment the same way as you show other "outdated diffs".
Workaround: Get everyone who comments to comment directly on the pull request.
Reacted by Maël Valais, Anthony Lamorte, Lochlan McIntosh, Matheus Azzi, Mauricio Klein, Jaakko Luttinen, Michael Kraft, Peter Peresini, Andreas Hennings, Adam Spiers and 63 more
I've updated the description in response to your question.
They aren't my comments, they're other peoples, it'll be hard to get everyone I ever work with to consistently ignore the comment on commit feature. Perhaps if there was a quick link from a commit to the diff it causes on any pull requests it's in that'd work.
Why allow commenting on commits in the first place if the comments will be lost?
Reacted by Adam Spiers, Paul Fenwick, Robert Monfera, Jonah Graham, Ayush Tiwari, Daira-Emma Hopwood, Steven Vancoillie, Nikola Stojiljkovic, Andrew Paugh and Matej Staroň
My team prefers to comment on the commits themselves during PR reviews because we like to read PRs commit-by-commit so that we can follow along with the author's thought process. We also prefer rebasing to merging and we find it incredibly painful to lose commit comments when rebasing.
Would it be possible to automatically attach commit comments to the PR itself? And if a line in a commit will be changed by a later commit in the same PR, the reviewer can be shown a warning before s/he writes a comment on that line?
Reacted by Cypress Frankenfeld, Daira-Emma Hopwood, Scott Steele, Adam Spiers, Pavel Sutyrin, Inti Ocean, Eino Gourdin, Nikola Stojiljkovic, Jamie Bisotti, Spiridonov Andrey and 4 more
This is incredibly frustrating. Github really encourages this style of review (many commits in a pr showing progress over time) but many projects dislike having the history of review meddle with their ability to git-bisect.
Reacted by Slawomir Brzezinski, petros , Cypress Frankenfeld, Daira-Emma Hopwood, Scott Steele, Erik Eckhardt and Nikola Stojiljkovic
In our team's workflow, we have code review comments addressed by adding new commits to the existing branch (and PR). Reviewing only what's changed since the last time you reviewed a change is useful in our flow. I'd even love being able to comment on a range of commits (i.e., all the commits since the last time I've reviewed), but not losing comments on rebase would be a huge step for us.
@GrahamTheCoder Hey looks like some of the aspects in your request here were implemented in the new "review comments" feature on github. We noticed now that in-line comments are no longer removed after being addressed with a new commit and are kept in the history on the "Conversation" tab, with the one minor(but glaring) issue that it doesn't mark the old comment in anyway like you suggested with "formerly part of this PR". We are feeling the frustration of the lack of documentation on these new "review comments" changes and how they were implemented. We would like to join the fray and request some feedback be heard from the community. At the conference last week (great time) we heard that they are "listening" and that they are going to do a better job to publish their public roadmap. They are going to be vague but at least get the idea across of what they are working on in the future.
Ah, I haven't actually tested them in a rebase situation. I just noticed you couldn't edit/delete review comments but could still edit/delete line comments.
+1 for this one, our project uses a rebase-driven PR approach as well. Supporting push -f properly so that rebased PRs display their history would be a major help for us.
@aspiers it is indeed. I just mentioned the rebase-driven approach because typically you either "pile-up" commits in the PR or you rebase (or amend if it's a single commit), and it's the latter that doesn't play nice with GitHub today.
Activity
cirosantilli commentedon Aug 14, 2015
Why not comment on the pull request instead?
GrahamTheCoder commentedon Aug 15, 2015
I've updated the description in response to your question.
They aren't my comments, they're other peoples, it'll be hard to get everyone I ever work with to consistently ignore the comment on commit feature. Perhaps if there was a quick link from a commit to the diff it causes on any pull requests it's in that'd work.
Why allow commenting on commits in the first place if the comments will be lost?
MHova commentedon Dec 10, 2015
My team prefers to comment on the commits themselves during PR reviews because we like to read PRs commit-by-commit so that we can follow along with the author's thought process. We also prefer rebasing to merging and we find it incredibly painful to lose commit comments when rebasing.
Would it be possible to automatically attach commit comments to the PR itself? And if a line in a commit will be changed by a later commit in the same PR, the reviewer can be shown a warning before s/he writes a comment on that line?
codemac commentedon Jan 27, 2016
This is incredibly frustrating. Github really encourages this style of review (many commits in a pr showing progress over time) but many projects dislike having the history of review meddle with their ability to git-bisect.
mdentremont commentedon Feb 18, 2016
+1 (@MHova that describes our situation as well)
evanrmurphy commentedon Mar 10, 2016
This is a real gotcha with rebasing pull requests on GitHub. Would love to see this issue addressed.
nvachhar commentedon Jul 29, 2016
In our team's workflow, we have code review comments addressed by adding new commits to the existing branch (and PR). Reviewing only what's changed since the last time you reviewed a change is useful in our flow. I'd even love being able to comment on a range of commits (i.e., all the commits since the last time I've reviewed), but not losing comments on rebase would be a huge step for us.
donquixote commentedon Sep 16, 2016
Two solutions I can see:
I have not tried this second solution with github. But I imagine it should work..
babineaum commentedon Sep 19, 2016
@GrahamTheCoder Hey looks like some of the aspects in your request here were implemented in the new "review comments" feature on github. We noticed now that in-line comments are no longer removed after being addressed with a new commit and are kept in the history on the "Conversation" tab, with the one minor(but glaring) issue that it doesn't mark the old comment in anyway like you suggested with "formerly part of this PR". We are feeling the frustration of the lack of documentation on these new "review comments" changes and how they were implemented. We would like to join the fray and request some feedback be heard from the community. At the conference last week (great time) we heard that they are "listening" and that they are going to do a better job to publish their public roadmap. They are going to be vague but at least get the idea across of what they are working on in the future.
UPDATE: Its actually called "code review" https://github.com/blog/
GrahamTheCoder commentedon Sep 20, 2016
Yes I did notice that review comments are now immutable parts of the conversation, whereas line comments are not.
babineaum commentedon Sep 20, 2016
Hey Graham,
I actually think that the line comments are also immutable now too.
GrahamTheCoder commentedon Sep 20, 2016
Ah, I haven't actually tested them in a rebase situation. I just noticed you couldn't edit/delete review comments but could still edit/delete line comments.
jamiesalts commentedon Oct 10, 2016
Comments not going away when a commit changes that line is incredibly frustrating.
carlescufi commentedon Jun 29, 2018
+1 for this one, our project uses a rebase-driven PR approach as well. Supporting
push -fproperly so that rebased PRs display their history would be a major help for us.aspiers commentedon Jun 29, 2018
IIUC this issue is a symptom of the broader issue that amending PR branches via force-push causes unreachable commits to be garbage-collected (#997). It's not just during rebase, but any force-push.
carlescufi commentedon Jun 29, 2018
@aspiers it is indeed. I just mentioned the rebase-driven approach because typically you either "pile-up" commits in the PR or you rebase (or amend if it's a single commit), and it's the latter that doesn't play nice with GitHub today.