Skip to content

ci: restore sentry/ org prefix in sentry-release workflow#648

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

ci: restore sentry/ org prefix in sentry-release workflow#648
BYK merged 1 commit intomainfrom
fix/sentry-release-org

Conversation

@BYK
Copy link
Copy Markdown
Member

@BYK BYK commented Apr 2, 2026

Summary

Fixes the third sentry-release failure:

Error: Organization is required.

The previous PR (#645) mistakenly removed the sentry/ prefix thinking it was a version prefix. It's actually the org slugparseReleaseArg("sentry/0.24.0") splits into org=sentry, version=0.24.0. Restoring it provides the org without needing SENTRY_ORG.

Fixes #647.

@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 🔧

  • Restore sentry/ org prefix in sentry-release workflow by BYK in #648
  • Restore sentry/ org prefix in sentry-release workflow by BYK in #648
  • Use production environment for sentry-release auth token by BYK in #645
  • 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.

…elease workflow

The sentry/ prefix in 'sentry release create sentry/0.24.0' is the org
slug, not a version prefix — parseReleaseArg splits it into org=sentry,
version=0.24.0. Restoring it removes the need for SENTRY_ORG env var.
@BYK BYK force-pushed the fix/sentry-release-org branch from a92ab25 to f715cd6 Compare April 2, 2026 19:46
@BYK BYK changed the title fix(ci): set SENTRY_ORG in sentry-release workflow fix(ci): restore sentry/ org prefix in sentry-release workflow Apr 2, 2026
@BYK BYK changed the title fix(ci): restore sentry/ org prefix in sentry-release workflow ci: restore sentry/ org prefix in sentry-release workflow Apr 2, 2026
@BYK BYK merged commit f930abc into main Apr 2, 2026
28 checks passed
@BYK BYK deleted the fix/sentry-release-org branch April 2, 2026 19:50
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.

Sentry release finalization failed for 0.24.0

1 participant