Skip to content
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

ci: block merging PRs with fixup! commits #430

Merged

Conversation

niklasdewally
Copy link
Collaborator

Block any PRs with any commits called fixup!, amend!, squash! from being merged.

As discussed in #425, force pushing to existing commits is annoying to code reviewers. Another approach is to do git commit --fixup <commit> when you need to respond to a code review comment on a particular commit, then run git rebase --autosquash before merging to get rid of these fixup commits. (https://rietta.com/blog/git-rebase-autosquash-code-reviews/)

This way, code reviewers can see the code review changes to the PR in a linear order, but still keep a proper git history.

@niklasdewally niklasdewally added the area::ci Related to CI, coverage, Github, etc. label Nov 10, 2024
@niklasdewally niklasdewally self-assigned this Nov 10, 2024
@niklasdewally
Copy link
Collaborator Author

:)
Screenshot 2024-11-10 at 13 54 23

@niklasdewally niklasdewally force-pushed the check-for-fixups-before-merging branch 2 times, most recently from 89a1727 to 2f24cb2 Compare November 10, 2024 13:57
@niklasdewally niklasdewally marked this pull request as draft November 10, 2024 13:58
@ozgurakgun
Copy link
Contributor

oh, this means other tests don't run? that's not ideal.

@niklasdewally
Copy link
Collaborator Author

oh, this means other tests don't run? that's not ideal.

other tests arn't running because this doesnt change any rust code - it shouldn't interfere with anything we already have

@niklasdewally niklasdewally force-pushed the check-for-fixups-before-merging branch 2 times, most recently from 369a012 to 5047932 Compare November 10, 2024 14:04
@niklasdewally niklasdewally marked this pull request as ready for review November 10, 2024 14:05
@ozgurakgun
Copy link
Contributor

did you manage to figure out what the difference is between the matijs action and the 13rac1 one?

@niklasdewally
Copy link
Collaborator Author

@ozgurakgun a QOL thing I just found: if you add the Require status checks to pass before merging branch protection, you can click a button to auto-merge a PR if

did you manage to figure out what the difference is between the matijs action and the 13rac1 one?

nothing, the former was just broken.

Block any PRs with any commits called fixup!, amend!, squash! from being
merged.

As discussed in conjure-cp#425, force pushing to existing commits is annoying to
code reviewers. Another approach is to do `git commit --fixup <commit>`
when you need to respond to a code review comment on a particular
commit, then run `git rebase --autosquash` before merging to get rid of
these fixup commits.
(https://rietta.com/blog/git-rebase-autosquash-code-reviews/)

This way, code reviewers can see the code review changes to the PR in a
linear order, but still keep a proper git history.
@ozgurakgun
Copy link
Contributor

is that an unfinished sentence in your last comment?

@ozgurakgun ozgurakgun merged commit 7817303 into conjure-cp:main Nov 10, 2024
1 check passed
@niklasdewally
Copy link
Collaborator Author

is that an unfinished sentence in your last comment?

Oops: I was messaging in the other PR where we were talking about this at the same time and got myself mixed up :(

@niklasdewally niklasdewally deleted the check-for-fixups-before-merging branch November 10, 2024 14:24
niklasdewally added a commit to niklasdewally/conjure-oxide that referenced this pull request Nov 10, 2024
Add guidance to not force push to PRs, as discussed in conjure-cp#430 and conjure-cp#425.

This new guidance roughly follows how LLVM does stuff:
https://llvm.org/docs//GitHub.html#updating-pull-requests
niklasdewally added a commit to niklasdewally/conjure-oxide that referenced this pull request Nov 10, 2024
Add guidance to not force push to PRs, as discussed in conjure-cp#430 and conjure-cp#425.

This new guidance roughly follows how LLVM does stuff:
https://llvm.org/docs//GitHub.html#updating-pull-requests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area::ci Related to CI, coverage, Github, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants