Repository navigation
fix(release): Skip a named PR merged elsewhere; mark a published draft - #184
Merged
Merged
Conversation
Two flaws found by Copilot's review of this pipeline's port to atelier-store (mpaulosky/atelier-store#90): - A manual run queued the PR it named without checking its base branch, so a PR merged into another branch failed the run on a merge commit main doesn't have. Only a PR merged into main is queued now. - Publishing a draft Release kept its body, so a draft without the Source PR line stayed invisible to the planner and the ordering guard, blocking every later PR. The release notes are appended first unless the draft already names the PR, keeping the draft's own text. Refs #144 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Conflicting source-PR metadata can publish an inconsistent release that remains queued or bypasses ordering checks.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Updates release handling to avoid queueing PRs merged outside main and to annotate draft releases before publication.
Changes:
- Filters manually named PRs by base branch.
- Adds regression coverage for non-
mainPRs. - Preserves draft notes while appending release metadata.
| File | Description |
|---|---|
.github/workflows/release.yml |
Adds metadata before publishing drafts. |
.github/scripts/release_queue.py |
Excludes named PRs not targeting main. |
.github/scripts/tests/test_release_queue.py |
Tests manual dispatch with another base branch. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #184 +/- ##
=======================================
Coverage 85.40% 85.40%
=======================================
Files 77 77
Lines 1596 1596
Branches 150 150
=======================================
Hits 1363 1363
Misses 189 189
Partials 44 44 |
A draft for this tag whose body already names a different PR would be published with two Source PR lines, so the planner and the ordering guard would disagree about which PR it releases. The step now stops with an error naming the other PR instead. Addresses Copilot review on #184. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
draft_release.py decides the body a draft is published with: append the release notes unless the draft names this PR on a line of its own, and fail when it names another PR. Sixteen tests cover the cases the workflow step only had manual checks for. Refs #144 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A draft with CRLF line endings that already names this PR got the release notes appended a second time, because the line-end match didn't allow the carriage return. The workflow's idempotency check already accepts CRLF. Refs #144 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mpaulosky
added a commit
that referenced
this pull request
Sep 30, 2026
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
mpaulosky
added a commit
to mpaulosky/atelier-store
that referenced
this pull request
Sep 30, 2026
Port of mpaulosky/IssueTracker#184's later fixes. draft_release.py returns the body to publish a draft with: the release notes are appended unless the draft names this PR on a line of its own (LF or CRLF), and a draft naming another PR, anywhere in a line, fails the job rather than give one Release two sources. Refs #86 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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
Two flaws in the release pipeline (#172), found by Copilot's review of its port to atelier-store (mpaulosky/atelier-store#90). This keeps IssueTracker, the reference implementation, in step.
release_queue.pyqueued the named PR without checking its base branch, so a PR merged into another branch failed the run withUnknownMergeOrder(its merge commit isn't onmain). Only a named PR whose base ismainis queued now.Source PR: #nmarker, so a draft without one stayed "owed" forever and blocked every later PR. The decision now lives in a tested helper,.github/scripts/draft_release.py: it appends the release notes unless the draft already names this PR on a line of its own (LF or CRLF), keeping the draft's own text. A draft that names a different PR is inconsistent, so the step stops with an error naming it rather than publish a Release with two sources. Markers count anywhere in a line, the patternrelease_post.source_pr_of()uses, so a- Source PR: #5list item is caught too.Testing
test_main_skips_a_manually_named_pr_merged_into_another_branch(it failed before the fix).test_draft_release.py(17 tests): no marker, an empty draft, this PR's line (also with CRLF endings), this PR only inside a longer line, another PR (alone, in a list item, or beside this PR's line),#5against#15and#50, agreement withsource_pr_of(), and the CLI's output and stderr error.bash -e, checked locally.yamllint,actionlintandzizmorare clean, and the pre-push gate passed.Refs #144
🤖 Generated with Claude Code