Skip to content

Auto-draft PRs with fixup commits #3772

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

Open
dmnks opened this issue May 27, 2025 · 0 comments
Open

Auto-draft PRs with fixup commits #3772

dmnks opened this issue May 27, 2025 · 0 comments
Labels
infra Development infrastructure (GitHub Actions and such)

Comments

@dmnks
Copy link
Contributor

dmnks commented May 27, 2025

When making additional changes to PRs that are already under review, we typically resort to using git commit --fixup (or direct edits via the GH interface), as a way to allow the reviewer to clearly differentiate what's been added on top of the already reviewed content. They're also used by reviewers themselves when fixing typos and such. GH does show diffs between last pushes but the usability is not great, and it's GH-specific. Fixups are a much nicer, git-native way.

However, once pushing a fixup commit to a PR branch, GH won't prevent anybody from hitting merge, with those fixup commits ending up in mainline history, causing embarrassment. Therefore, the unwritten rule has been to turn such a PR to draft whenever making fixups. But that's a manual step that's easily forgotten...

So, add a GH action to automate this, by turning a PR to draft when there's a commit with a fixup! prefix pushed. Later, we could also automate the opposite ("undrafting") based on PR approval or something, but let's keep it simple for now.

@pmatilai pmatilai added this to RPM May 27, 2025
@github-project-automation github-project-automation bot moved this to Backlog in RPM May 27, 2025
@dmnks dmnks added the infra Development infrastructure (GitHub Actions and such) label May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra Development infrastructure (GitHub Actions and such)
Projects
Status: Backlog
Development

No branches or pull requests

1 participant