Repository navigation
fix(bundler-plugins): Fall back to local git history when setting commits - #26760
Conversation
…mits
`setCommits: { auto: true }`, also the default, passed `--auto` to the new
CLI. The new `--auto` fails when no repository integration matches the
`origin` remote, and the plugin swallowed that error, so no commit was
linked. The plugin now runs `set-commits` without a mode flag. The CLI
then uses the repository integration and falls back to local git history,
as `--auto` of the old CLI did.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
size-limit report 📦Compared: 5f34c38 (PR test merge using develop at 9e67631) Against: 9e67631 (develop) · base run #67516 ✅ Baseline matches: this diff contains only this PR's changes.
|
Optional E2E testsSome optional checks were not successful. They do not block the merge. 2 not successful, 62 successful. See the run.
Successful checks
|
| * | ||
| * `auto: true` runs `set-commits` without a mode flag, not with `--auto`. Without a flag, the CLI | ||
| * links commits through the repository integration and falls back to local git history when no | ||
| * integration matches the repository, as `--auto` of the old CLI did. The new `--auto` fails instead. |
There was a problem hiding this comment.
When no integration matches, the new CLI falls back to the last --initial-depth (20) commits from HEAD, with no previous-release boundary. Commits will overlap between releases for these orgs. Not a blocker, but could you open a CLI issue to track it? Or call it out here
There was a problem hiding this comment.
great point. I will create a ticket 👀
|
Does this conflict/interact with #26748 in any way (that also touched auto stuff I believe)? |
Yes and no. It updates the |
closes #26705
closes JS-4136
Description
This fixes
release.setCommits: { auto: true }, which is also the default. When no repository integration matches theoriginremote, the plugin now links the commits from the local git history, as@sentry/vite-plugin5.x did.Why
The plugin passed
--autoto the newsentryCLI. The new--autofails when no integration matches, and the plugin swallowed the error, so no commit was linked and the build printed nothing. Without a mode flag, the CLI tries the integration and falls back to local git history, like--autoof@sentry/cliv2.Fallback decisions
The fallback also applies when users set
auto: truethemselves, not only to the default, since@sentry/cliv2 fell back in both cases. We could keep--autofor an explicitauto: trueinstead, but then it would fail where 5.x did not.