Repository navigation
fix(post-result): Advise a retry when a failed publish already has targets done - #10269
Merged
Merged
Conversation
…rgets done When Craft fails after some targets published (for example, when the release branch merge fails after every target shipped), the failure comment told people to delete the release branch and start over. That can't work: the version is already out. The comment now lists the checked targets from the Craft publish state and says to fix the cause and re-add `accepted`, so the retry skips them. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
BYK
approved these changes
Nov 6, 2026
…mment Apply review feedback: the advice now says to keep the release branch and that fixes can go in as PRs to it, noting that the remaining targets then publish from the new commit. The default "Bad branch?" advice also mentions fixing the branch with a PR before deleting it.
BYK
approved these changes
Nov 6, 2026
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.
Companion to getsentry/craft#965. With that change, Craft fails the publish when it can't merge the release branch back, even though every target already shipped. The failure comment here then says "Bad branch? You can delete with ease and start over", which is the wrong advice: the version is already out, so starting over can't work, and the fix is to retry.
What changed
CRAFT_STATE_FILE_PATH(the same.issuehard link that "Update completed targets" reads).post-result.jsreads the published targets from it. When any target is checked, the comment lists them and says to fix the cause in the run logs and re-addaccepted, because the retry skips the checked targets. Otherwise the comment keeps the "Bad branch?" link.Example:
Caveat: the state file also has targets that someone checked by hand to skip them, so a run that fails before it publishes anything but has hand-checked targets gets the retry advice too. I think that's fine, because retrying is still safe there.
Verification:
pnpm test(163 tests) andpnpm lintpass. The new tests cover the comment with and without done targets, reading the state file (present, missing, unreadable), and the workflow wiring.via @BYK.
--
View Session in Sentry