Skip to content

fix(seer): Find repos by their URL path - #130314

Merged
joseph-sentry merged 1 commit into
masterfrom
joey--seer-repo-lookup-by-url-path
Nov 12, 2026
Merged

joseph-sentry merged 1 commit into
masterfrom
joey--seer-repo-lookup-by-url-path

Conversation

@joseph-sentry

@joseph-sentry joseph-sentry commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

GitLab has 2 formats for repo slugs:

  • display format: My Group / App
  • url format: my-group/app

we were previously requiring the agent to search by display format, but
the url format is also valid, so we now have our search look through both
formats by checking Repository URLs.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 6, 2026
@joseph-sentry joseph-sentry changed the title joey seer repo lookup by url path fix(seer): Find repos by their URL path Nov 6, 2026
@joseph-sentry
joseph-sentry force-pushed the joey--seer-repo-lookup-by-url-path branch from 529ba59 to c9909ee Compare November 9, 2026 18:13
GitLab has 2 formats for repo slugs:
- display format: `My Group / App`
- url format: `my-group/app`

we were previously requiring the agent to search by display format, but
the url format is also valid, so we now have our search look through both
formats by checking Repository URLs.
@joseph-sentry
joseph-sentry force-pushed the joey--seer-repo-lookup-by-url-path branch from c9909ee to e0e3e45 Compare November 9, 2026 19:40
@joseph-sentry

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit e0e3e45. Configure here.

@joseph-sentry
joseph-sentry marked this pull request as ready for review November 10, 2026 20:46
@joseph-sentry
joseph-sentry requested a review from a team as a code owner November 10, 2026 20:47
"""Find a repository by its name or its URL path. They're the same except on GitLab, where the
name is a display name ("My Group / App") and the path is "my-group/app"."""
candidates = Repository.objects.filter(
Q(name=repo_full_name) | Q(url__iendswith=f"/{repo_full_name}"),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is this gonna be a problem if an org has both github + gitlab with the same names?

@joseph-sentry joseph-sentry Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i'm gonna handle this in a follow-up
but yeah right now it uses the lowest ID repo in our DB

@joseph-sentry
joseph-sentry merged commit 90fdab4 into master Nov 12, 2026
72 checks passed
@joseph-sentry
joseph-sentry deleted the joey--seer-repo-lookup-by-url-path branch November 12, 2026 20:04
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.

2 participants