Skip to content

ci: fix sentry-release workflow Node.js version and add manual trigger#643

Merged
BYK merged 1 commit intomainfrom
fix/sentry-release-node-version
Apr 2, 2026
Merged

ci: fix sentry-release workflow Node.js version and add manual trigger#643
BYK merged 1 commit intomainfrom
fix/sentry-release-node-version

Conversation

@BYK
Copy link
Copy Markdown
Member

@BYK BYK commented Apr 2, 2026

Summary

Fixes the failed Sentry Release workflow for 0.24.0.

Root cause: ubuntu-latest ships Node.js v20.20.2 but the sentry npm package requires >=22:

Error: sentry requires Node.js 22 or later (found v20.20.2).

Changes

  • Add actions/setup-node@v6 with node-version: 22 before npm install
  • Add workflow_dispatch trigger with a 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

After merging

Re-run for 0.24.0:

gh workflow run sentry-release.yml -f version=0.24.0

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Bug Fixes 🐛

  • (upgrade) Add blank lines around changelog in upgrade output by BYK in #642

Internal Changes 🔧

  • Fix sentry-release workflow Node.js version and add manual trigger by BYK in #643
  • Regenerate skill files and command docs by github-actions[bot] in 59c820e4

🤖 This preview updates automatically when you update the PR.

@BYK BYK changed the title fix(ci): fix sentry-release workflow Node.js version and add manual trigger ci: fix sentry-release workflow Node.js version and add manual trigger Apr 2, 2026
…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
@BYK BYK force-pushed the fix/sentry-release-node-version branch from 2ba7aa5 to 09e01fe Compare April 2, 2026 18:53
@BYK BYK merged commit 38818d0 into main Apr 2, 2026
25 checks passed
@BYK BYK deleted the fix/sentry-release-node-version branch April 2, 2026 18:58
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%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant