fix: resolve draft releases in promote-release validation#510
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes promote-release validation failing to find draft GitHub Releases by switching from the per-tag release endpoint (which 404s for drafts) to a releases list lookup, and applies the same lookup to RC-tag cleanup for consistency.
Changes:
- Update upstream
promote-release.ymlto locate releases viagh api .../releases --paginateand select bytag_name. - Apply the same change to the workspace template workflow.
- Add an Unreleased changelog entry (and synced devcontainer copy) referencing #507.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
.github/workflows/promote-release.yml |
Changes draft-release verification and RC tag cleanup to use list-releases lookup by tag_name. |
assets/workspace/.github/workflows/promote-release.yml |
Mirrors the upstream workflow fix in the workspace template. |
CHANGELOG.md |
Adds Unreleased “Fixed” entry for #507. |
assets/workspace/.devcontainer/CHANGELOG.md |
Syncs the same changelog entry into the workspace devcontainer copy. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
gh api does not support --arg (that is a jq flag). Split the call into gh api --paginate followed by piped jq -s --arg. In the RC tag cleanup steps, distinguish API failure (skip deletion with warning) from confirmed "no release" (proceed with deletion). Refs: #507
This was referenced Apr 10, 2026
c-vigo
added a commit
that referenced
this pull request
Apr 10, 2026
## Description Updates the smoke-test `repository-dispatch` workflow so **final** releases dispatch downstream `promote-release.yml` (publish draft release, merge release PR, RC tag cleanup) instead of merging the release PR from the listener alone. **RC** dispatches wait for required checks on the release PR and stop with the PR left open. Preflight now requires `promote-release.yml` on the `dev` ref. Cross-repo gate docs describe the split behavior and that the canonical flow no longer needs a manual publish on smoke-test before upstream promote. ## Type of Change - [ ] `feat` -- New feature - [ ] `fix` -- Bug fix - [ ] `docs` -- Documentation only - [ ] `chore` -- Maintenance task (deps, config, etc.) - [ ] `refactor` -- Code restructuring (no behavior change) - [ ] `test` -- Adding or updating tests - [x] `ci` -- CI/CD pipeline changes - [ ] `build` -- Build system or dependency changes - [ ] `revert` -- Reverts a previous commit - [ ] `style` -- Code style (formatting, whitespace) ### Modifiers - [ ] Breaking change (`!`) -- This change breaks backward compatibility ## Changes Made - `assets/smoke-test/.github/workflows/repository-dispatch.yml` - Add `promote-release.yml` to preflight `REQUIRED_WORKFLOWS`. - Replace `merge-release-pr` with `wait-release-pr-ci` (`gh pr checks --required`, fail/cancel handling, 30m timeout). - Add `trigger-promote-release` for `release_kind == final` only: dispatch and poll `promote-release.yml` on `dev` with `version` = base semver. - Update `summary` / `notify-failure` dependencies and result checks (final requires promote success; candidate requires promote skipped). - `docs/CROSS_REPO_RELEASE_GATE.md` — contract, receiver steps, promote gate wording for automated downstream publish. - `CHANGELOG.md` and `assets/workspace/.devcontainer/CHANGELOG.md` — Unreleased **Changed** entry for #511. ## Changelog Entry ```diff @@ -27,6 +27,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **Sync workflows run in devcontainer image** ([#509](#509)) - `sync-issues` and `sync-main-to-dev` use `resolve-image` and run inside the pinned devcontainer, removing the `setup-env` composite action dependency and the inlined retry helper - `sync-main-to-dev` creates sync branches via `git push` instead of the GitHub refs API +- **Smoke-test dispatch triggers promote-release for final releases** ([#511](#511)) + - Final releases dispatch downstream `promote-release.yml` instead of merging the release PR directly, publishing the draft GitHub Release and satisfying the upstream promote-time downstream gate + - RC releases wait for release PR required checks but no longer merge the PR to `main` ### Deprecated ``` ## Testing - [ ] Tests pass locally (`just test`) - [ ] Manual testing performed (describe below) ### Manual Testing Details N/A — GitHub Actions workflow and documentation only; end-to-end validation happens after the template is deployed to `vig-os/devcontainer-smoke-test` (see issue prerequisite: PR #510 merged there). ## Checklist - [x] My code follows the project's style guidelines - [x] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have updated the documentation accordingly (edit `docs/templates/`, then run `just docs`) - [x] I have updated `CHANGELOG.md` in the `[Unreleased]` section (and pasted the entry above) - [x] My changes generate no new warnings or errors - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published ## Additional Notes N/A Refs: #511
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.
Description
The promote-release validate step queried
GET /repos/{owner}/{repo}/releases/tags/{tag}, which does not return draft releases (404). The workflow now uses the paginated releases list API and jq to select the release bytag_name, so draft releases created byrelease.ymlare found. The RC git tag cleanup step uses the same lookup so “release exists” stays correct for drafts if they ever apply.Type of Change
feat-- New featurefix-- Bug fixdocs-- Documentation onlychore-- Maintenance task (deps, config, etc.)refactor-- Code restructuring (no behavior change)test-- Adding or updating testsci-- CI/CD pipeline changesbuild-- Build system or dependency changesrevert-- Reverts a previous commitstyle-- Code style (formatting, whitespace)Modifiers
!) -- This change breaks backward compatibilityChanges Made
.github/workflows/promote-release.yml— Draft release verification and RC tag cleanup usegh api …/releases --paginatewithjqto matchtag_nameinstead of the per-tag endpoint.assets/workspace/.github/workflows/promote-release.yml— Same behavior for the downstream template.CHANGELOG.md— Unreleased Fixed entry for [BUG] promote-release validate step uses API endpoint that cannot find draft releases #507.assets/workspace/.devcontainer/CHANGELOG.md— Synced copy of the changelog entry (manifest sync).Changelog Entry
Fixed
GET /releases/tags/{tag}, which returns 404 for draft releasespromote-release.ymlTesting
just test)Manual Testing Details
N/A — workflow-only change; not exercised locally against GitHub. Pre-commit (yaml/yamllint) passed on commit.
Checklist
docs/templates/, then runjust docs)CHANGELOG.mdin the[Unreleased]section (and pasted the entry above)Additional Notes
N/A
Refs: #507