feat(code-mappings): Add git inference for repo and default branch#3208
Draft
romtsn wants to merge 2 commits intorz/feat/code-mappings-scaffoldfrom
Draft
feat(code-mappings): Add git inference for repo and default branch#3208romtsn wants to merge 2 commits intorz/feat/code-mappings-scaffoldfrom
romtsn wants to merge 2 commits intorz/feat/code-mappings-scaffoldfrom
Conversation
Contributor
|
684caab to
912da39
Compare
fb49d43 to
029aeaf
Compare
This was referenced Mar 12, 2026
Automatically detect repository name and default branch from the local git repo when --repo or --default-branch are not provided. Respects SENTRY_VCS_REMOTE config, falling back to best-effort remote detection. Extract find_best_remote() into vcs.rs to deduplicate remote selection logic shared with git_repo_base_repo_name_preserve_case().
912da39 to
95e8814
Compare
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.
#skip-changelog
When
--repoor--default-branchare not provided, infer them from thelocal git repository. Uses the configured VCS remote (SENTRY_VCS_REMOTE / ini)
first, then falls back to best-effort remote detection (upstream > origin > first).
Also extracts
find_best_remote()as a shared utility insrc/utils/vcs.rs,replacing the inline logic that was duplicated in
git_repo_base_repo_name_preserve_case.Stack: #3207 → #3208 → #3209 → #3210
Backend PRs: getsentry/sentry#109783, getsentry/sentry#109785, getsentry/sentry#109786
Closes getsentry/sentry-android-gradle-plugin#1078