ci: fix sentry-release workflow Node.js version and add manual trigger#643
Merged
ci: fix sentry-release workflow Node.js version and add manual trigger#643
Conversation
Contributor
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Bug Fixes 🐛
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
…o sentry-release workflow The workflow failed on its first run (0.24.0) because the ubuntu-latest runner ships Node.js v20 but the sentry npm package requires >=22. - Add actions/setup-node@v6 with node-version 22 - Add workflow_dispatch trigger with version input for manual re-runs - Add gh issue create step on failure so broken releases file a bug automatically - Add issues: write permission for the failure step
2ba7aa5 to
09e01fe
Compare
5 tasks
BYK
added a commit
that referenced
this pull request
Apr 3, 2026
## Summary Fixes `set-commits --auto` to properly discover commits and documents release workflow pitfalls learned from shipping the sentry-release CI workflow. Continuation of #643, #645, #648, #649 (all merged). ## Changes ### `set-commits --auto` rewrite (`src/lib/api/releases.ts`) - **Replace bogus `{repository: "auto", commit: "auto"}`** — list org repos via paginated API, match against local git remote, send real refs with HEAD SHA - **Fetch previous release commit** via `/previous-with-commits/` endpoint so Sentry can compute the commit range (without this, 0 commits are reported) - **Paginate** through all org repos with early-exit (`listRepositoriesPaginated`) - Use `ApiError` for no-repos (correct negative caching), `ValidationError` for local git failures - Fix `ApiError` constructor: `endpoint` as 4th arg, not 3rd ### Fallback fix (`src/commands/release/set-commits.ts`) - Catch `ValidationError` in `setCommitsDefault` → fall back to local git history ### Workflow fixes (`.github/workflows/sentry-release.yml`) - `actions/checkout@v6` with `fetch-depth: 0` (needed for `--auto` git discovery) - Move `--url` from `release create` to `release deploy` (URL belongs on the deploy) - Inline comments documenting every pitfall (Node.js version, env scoping, org prefix) ### Documentation - **agent-guidance.md**: New "Release Workflow" section with CI/CD setup notes; new Common Mistakes for version mismatch and `--auto` without checkout - **release.md**: CI workflow example + "Important Notes" section - **create.ts help**: Clarifies `org/version` positional format and version matching - **set-commits.ts help**: Clarifies `--auto` requires git checkout; documents default fallback behavior - Regenerated SKILL.md + reference files ### Tests - Isolated tests: repo discovery, pagination, no-match, no-repos, no-remote, previous commit fetch - Command tests: `--auto` cwd pass-through, `ValidationError` fallback in default mode - Patch coverage: `releases.ts` ~99%, `set-commits.ts` ~75%
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
Fixes the failed Sentry Release workflow for 0.24.0.
Root cause:
ubuntu-latestships Node.js v20.20.2 but thesentrynpm package requires>=22:Changes
actions/setup-node@v6withnode-version: 22beforenpm installworkflow_dispatchtrigger with aversioninput for manual re-runsgh issue createstep onfailure()so broken releases file a bug automaticallyissues: writepermission for the failure stepAfter merging
Re-run for 0.24.0: