Skip to content

feat(code-mappings): Add git inference for repo and default branch#3208

Draft
romtsn wants to merge 2 commits intorz/feat/code-mappings-scaffoldfrom
rz/feat/code-mappings-git-inference
Draft

feat(code-mappings): Add git inference for repo and default branch#3208
romtsn wants to merge 2 commits intorz/feat/code-mappings-scaffoldfrom
rz/feat/code-mappings-git-inference

Conversation

@romtsn
Copy link
Member

@romtsn romtsn commented Mar 12, 2026

#skip-changelog

When --repo or --default-branch are not provided, infer them from the
local 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 in src/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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 12, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 802052f

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().
@romtsn romtsn force-pushed the rz/feat/code-mappings-git-inference branch from 912da39 to 95e8814 Compare March 12, 2026 11:11
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