fix(version-dispatch): clear preview comment on every gated early-return#83
Merged
Merged
Conversation
When an open PR transitions into a gated state mid-flight — someone adds a \`skip-release\` label, retargets the base off the default branch, or the workspace map suddenly returns empty — the action used to return early without touching any prior preview comment, so the stale "Version preview" comment lingered on the PR. Route every preview-mode early-return through the new \`clearVersionPreview\` helper which deletes any prior preview comment by marker. Adds two integration tests covering the \`skip-release\` and non-default-branch transitions. 160/160 tests passing.
exo-mv
approved these changes
May 13, 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.
Summary
After #82, the action posts a sticky `Version preview` comment on every open-PR run. if a PR's preview comment has been posted and someone later adds `skip-release` (or retargets the base), the action returns early without touching the comment, so reviewers are left with a stale "this PR will release X" message on a PR that no longer will.
This PR routes every preview-mode early-return through a new `clearVersionPreview` helper that deletes any prior preview comment by HTML marker before returning.
Paths covered
Tests
Required workflow change for consumers
For the new cleanup to actually fire when someone adds the label mid-flight, the consuming workflow needs:
Hydra's consuming PR is being updated to match.