Skip to content

feat(repositories): Auto-link repos to projects by name matching#116533

Open
wedamija wants to merge 2 commits into
masterfrom
danf/auto-link-repos-by-name
Open

feat(repositories): Auto-link repos to projects by name matching#116533
wedamija wants to merge 2 commits into
masterfrom
danf/auto-link-repos-by-name

Conversation

@wedamija
Copy link
Copy Markdown
Member

When new Repository rows are created automatically, match the repo's base name against project slugs in the same org. If matched and neither side already has a link, create a ProjectRepository with source=AUTO_NAME_MATCH.

This includes a dry-run mode so that we can test things out first.

@wedamija wedamija requested a review from a team May 29, 2026 21:30
@wedamija wedamija requested review from a team as code owners May 29, 2026 21:30
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 29, 2026
@wedamija wedamija force-pushed the danf/auto-link-repos-by-name branch from ac08fb8 to e6ce488 Compare May 29, 2026 21:34
Comment thread src/sentry/integrations/source_code_management/auto_link_repos.py Outdated
Comment thread src/sentry/integrations/source_code_management/auto_link_repos.py Outdated
@wedamija wedamija force-pushed the danf/auto-link-repos-by-name branch from e6ce488 to ebe0786 Compare May 29, 2026 21:52
Comment thread src/sentry/integrations/source_code_management/auto_link_repos.py Outdated
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ebe0786. Configure here.

Comment thread src/sentry/integrations/github/tasks/sync_repos_on_install_change.py Outdated
When new Repository rows are created automatically, match the repo's base name against project slugs in the same org. If matched and neither side already has a link, create a ProjectRepository with source=AUTO_NAME_MATCH.

This includes a dry-run mode so that we can test things out first.
@wedamija wedamija force-pushed the danf/auto-link-repos-by-name branch from ebe0786 to 64cf09e Compare May 29, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant