Repository navigation
fix: plan a draft PR when it's marked ready for review - #2751
Open
dannysauer wants to merge 1 commit into
Open
dannysauer wants to merge 1 commit into
dannysauer wants to merge 1 commit into
Conversation
With allow_draft_prs false, pushes to a draft are skipped, and the ready_for_review event that follows was ignored, so nothing planned the PR until another push or a "digger plan" comment. Handle ready_for_review like a push when draft PRs are disabled. When they're enabled, the draft's pushes were already planned, so ignore it. This builds on diggerhq#2294 by @MrKeiKun, which first proposed handling ready_for_review, and differs in three ways: - It ignores ready_for_review when allow_draft_prs is true, so a draft that was already planned isn't planned again. - It reuses the existing pull request job path instead of copying it, so new job fields can't drift between the two. - It leaves out diggerhq#2294's change to closed events. Develop has handled branches deleted after merge since diggerhq#2312. The guard lives in the shared job conversion, so the CLI's backendless mode follows the same rule for a workflow that subscribes to ready_for_review. The backend also returns early, before impacted-project detection, so an ignored event doesn't touch the PR's checks. Fixes diggerhq#2291 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #2291. With
allow_draft_prs: false, pushes to a draft PR are skipped, and theready_for_reviewevent that follows was ignored. Marking a draft ready planned nothing until another push or adigger plancomment.The backend now handles
ready_for_reviewlike a push when draft PRs are disabled. When they're enabled, the draft's pushes were already planned, so it ignores the event.This builds on #2294 by @MrKeiKun, which first proposed handling
ready_for_review. Thank you for that. This version differs in three ways:ready_for_reviewwhenallow_draft_prsis true, so a draft that was already planned isn't planned again.If this lands, #2294 can be closed.
Notes for reviewers
pr_locks, marking a PR ready takes the locks that converting it to draft released.ready_for_reviewfollows the sameallow_draft_prsrule.reopenedor adigger plancomment.Testing
libs/ci/githubchecks thatready_for_reviewproduces exactly the jobssynchronizedoes.backend/controllerstests pass.allow_draft_prsandon_pull_request_pushedare updated.We run this on our self-hosted backend: marking a draft ready now plans it.
We reviewed it with Claude Code and then with Codex before opening.