Skip to content

Handle empty pull request rebases - #942

Draft
zaniebot wants to merge 1 commit into
mainfrom
zb/close-empty-rebased-prs
Draft

zaniebot wants to merge 1 commit into
mainfrom
zb/close-empty-rebased-prs

Conversation

@zaniebot

@zaniebot zaniebot commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

When every commit becomes empty during a rebase, the workflow still tries to create a Git bundle from an empty revision range and fails. Skip the bundle and push for that outcome, and close the pull request with a comment only when an independent merge of its original changes produces exactly the pinned base tree.

Leave uncertain cases open for review and recheck the head and base before closing. Keep closure in a separate trusted workflow with a same-repository pull_requests: write grant, without checking out pull request code or deleting the branch.

Closes #419.

@astral-automations-bot astral-automations-bot Bot added internal:automations Related to internal automations internal A refactor or improvement that is not user-facing labels Sep 1, 2026
@zaniebot zaniebot added priority:2 Important: bounded correctness, release reliability, committed work, or proven performance gains. size:4 Complex: architectural or security-sensitive work requiring broad or cross-repository context. labels Sep 9, 2026
@astral-automations-bot
astral-automations-bot Bot force-pushed the zb/close-empty-rebased-prs branch from f4bffe9 to 9781570 Compare September 9, 2026 22:33

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal:automations Related to internal automations internal A refactor or improvement that is not user-facing priority:2 Important: bounded correctness, release reliability, committed work, or proven performance gains. risk:3 Credible risk of meaningful incorrect behavior or regression; bounded or recoverable. size:4 Complex: architectural or security-sensitive work requiring broad or cross-repository context.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rebase workflow fails when all pull request commits become empty

2 participants