Repository navigation
feat: handle draft PR lifecycle state - #13
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds first-class support for GitHub draft pull requests in the canonical PR lifecycle, including a new derived display status (draft) while preserving CI failure as the dominant signal.
Changes:
- Introduces
domain.PRDraftand a new deriveddomain.StatusDraft, plus status-derivation rules for draft PRs. - Routes draft SCM observations through the existing open-PR decision ladder, but short-circuits review/merge states for drafts.
- Extends unit tests across lifecycle manager, decision logic, and status derivation to cover draft behavior.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| backend/internal/lifecycle/manager.go | Handles PRDraft SCM observations by running the open-PR ladder with Draft=true. |
| backend/internal/lifecycle/manager_test.go | Adds ApplySCMObservation coverage for draft PR scenarios (draft vs ci_failed). |
| backend/internal/domain/status.go | Adds StatusDraft and draft-specific status derivation (CI failure still wins). |
| backend/internal/domain/status_test.go | Adds draft status-derivation test cases. |
| backend/internal/domain/lifecycle.go | Adds PRDraft canonical PR state. |
| backend/internal/domain/decide/types.go | Extends OpenPRInput with a Draft flag and updates documentation. |
| backend/internal/domain/decide/decide.go | Updates open-PR ladder to emit PRDraft + StatusDraft when Draft=true (CI failure still dominates). |
| backend/internal/domain/decide/decide_test.go | Adds decision tests for draft behavior and PRState emission. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1 of 8 tasks
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\n- add canonical PR state and display status for GitHub draft PRs\n- derive draft display status while keeping CI failure dominant\n- route draft PR SCM observations through the PR ladder without review/merge statuses\n\n## Tests\n- go test ./...\n- go build ./...