Repository navigation
fix(cli): Say how to connect an integration when set-commits --auto finds no repos - #1900
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
sentry-junior
Bot
force-pushed
the
cli/set-commits-no-repos
branch
from
November 3, 2026 19:51
6190143 to
c017b7b
Compare
sentry-junior
Bot
force-pushed
the
cli/set-commits-no-repos
branch
2 times, most recently
from
November 3, 2026 19:57
809e7c0 to
af4bc84
Compare
sentry-junior
Bot
force-pushed
the
cli/set-commits-no-repos
branch
from
November 3, 2026 20:01
af4bc84 to
cc7c50b
Compare
betegon
force-pushed
the
cli/set-commits-no-repos
branch
from
November 3, 2026 20:58
cc7c50b to
d585f10
Compare
betegon
self-requested a review
November 3, 2026 20:59
…inds no repos When the org has no repositories in Sentry, `release set-commits --auto` only said "No repository integrations configured for this organization." (about 27% of CLI-2SK). The error now links the org's source code integrations page, suggests `sentry integration list <org>/`, and suggests `--local` when run inside a git checkout. It stays an ApiError with the same message and 404 status, so default mode still falls back to local history and error reporting still silences it. Co-Authored-By: Claude <noreply@anthropic.com>
betegon
force-pushed
the
cli/set-commits-no-repos
branch
from
November 3, 2026 21:21
d585f10 to
207c4e8
Compare
betegon
added a commit
that referenced
this pull request
Nov 4, 2026
…'t have (#1902) Part 6 of the set-commits stack, on #1900. About 73% of CLI-2SK is `release set-commits --commit owner/repo@sha` naming a repository the org doesn't have. Many of these come from Vercel builds, where the bundler plugin passes the repository name. Sentry matches names exactly (`Release.set_refs`, `name__in`) and answers with `{"refs":["Invalid repository names: ..."]}`. The CLI only showed "API request failed: 400 Bad Request". The CLI now looks the repository up and says which case applies: - **Same repository under another name** (case, GitLab display names): the error names the Sentry name and gives a ready-to-run `--commit` command. - **The org has no repositories:** the error links the source code integrations page and suggests `sentry integration list`. - **The repository isn't added:** the error lists up to three similar names, `sentry repo list`, and the repository settings link. The lookups are best-effort. If they fail, the error still links the repository settings. Other errors pass through unchanged. The error is a `ValidationError` with field `commit.repository`. The next PR stops reporting it to Sentry. The release docs now say that commits need a repository in Sentry. <!-- junior-request-attribution:start --> via **bete**. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AC0C615WFS9G%3A1793734411.837769 --> -- [View Session](https://junior-prod.sentry.dev/conversations/slack%3AC0C615WFS9G%3A1793734411.837769) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0C615WFS9G%3A1793734411.837769/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Miguel Betegon <miguel.betegon@sentry.io>
7 tasks done
This branch was successfully deployed
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.
Part 5 of the set-commits stack. #1866 has merged, so this is now on
main. Splits CLI-2SK into one PR per fix.When the org has no repositories in Sentry,
release set-commits --autoonly said "No repository integrations configured for this organization." That's about 27% of CLI-2SK. Nothing on the command line can fix it, so the error now says where to go next:/settings/integrations/?category=source%20code%20management).sentry integration list <org>/.--localwhen run inside a git checkout.The CLI can't install integrations (
sentry integrationonly haslistanddelete, and GitHub needs a browser install), so the error sends people to the Sentry UI.It stays an
ApiErrorwith the same message and 404 status, so default mode still falls back to local history and error reporting still silences it.The rest of CLI-2SK is in #1902 (
--commitwith a repository Sentry doesn't have) and #1903 (stop reporting that one as a CLI error).Before / after
The real CLI, run from source, against a local mock of the Sentry API for an org
acmewith no repositories. Before is8eba364a(the old base, before this change). After is207c4e8d, the current head onmain.Git checkout,
origin=github.com/acme/webBefore:
After:
No
.git, repository from CI variables (GITHUB_REPOSITORY,GITHUB_SHA)Before:
After (no
--local, since there's no git history to read):Both exit with code 30, before and after.
Unchanged: default mode still falls back to local history (same output before and after):
The suggested command runs:
The integrations link
static/app/components/onboardingWizard/taskConfig.tsx) and the stack trace "add integration" banner (addIntegrationBanner.tsx) both link/settings/${org}/integrations/withquery: {category: 'source code management'}.location.query.category(integrationListDirectory.tsx).getCategoriesinintegrationUtil.tsxmaps thecommitsfeature tosource code management. The integrations withIntegrationFeatures.COMMITSare GitHub, GitHub Enterprise, GitLab, Bitbucket, Bitbucket Server, Azure DevOps (vsts), and Perforce.https://sentry.sentry.io/settings/integrations/?category=source%20code%20managementreturns a 302 to the org login (/auth/login/sentry/). A settings path that doesn't exist redirects to/settings/sentry/instead./settings/<org>/integrations/, which is covered bysentry-urls.property.test.ts.via bete.
--
View Session [Sentry]