-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid generating review drafts for merge commits. #284
Conversation
This avoids generating review drafts for merge commits unless the merge commit has modifications to the review draft (which I believe means that it's different from *all* parents of the merge). The code prior to this change tries to generate a review draft if the first parent of the merge commit introduces a review draft. (This happens if "git merge main" is done on a feature branch and main has introduced a review draft.)
This git command appears unchanged since it was introduced in c38c237. |
(Also, seems like I don't have the power to make a review request in this repository, but I was hoping to request review from @domenic, who has made most of the recent changes to this file.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me that this should work in all cases, but I’ll hold off on merging until Domenic weighs in too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to trust you that this is better. Can you also update https://github.com/whatwg/whatwg.org/blob/main/resources.whatwg.org/build/deploy.sh#L125 so that these stay in sync, per the comment?
This avoids generating review drafts for merge commits unless the merge commit has modifications to the review draft (which I hope means that it's different from all parents of the merge). The code prior to this change tries to generate a review draft if the first parent of the merge commit introduces a review draft. (This happens if "git merge main" is done on a feature branch and main has introduced a review draft.) This matches the change in whatwg/html-build#284 .
Created whatwg/whatwg.org#424 . (I did see that comment, but I couldn't figure out what it was referring to.) |
This avoids generating review drafts for merge commits unless the merge commit has modifications to the review draft (which I hope means that it's different from all parents of the merge). The code prior to this change tries to generate a review draft if the first parent of the merge commit introduces a review draft. (This happens if "git merge main" is done on a feature branch and main has introduced a review draft.) This matches the change in whatwg/html-build#284 .
This avoids generating review drafts for merge commits unless the merge commit has modifications to the review draft (which I hope means that it's different from all parents of the merge).
The code prior to this change tries to generate a review draft if the first parent of the merge commit introduces a review draft. (This happens if "git merge main" is done on a feature branch and main has introduced a review draft.)
This came up in the discussion starting in whatwg/html#9400 (comment) .
I'm not aware of a better way to tell
git show
to skip the header other than--format=format:
.I'm not 100% sure about how this handles all edge cases, but I tested the git command against the basic cases of a regular commit that does or doesn't modify a review draft, and against two variants of merge commit from the above pull (with parents in both orders).