Skip to content

fix(integrations): URL-safe quote project_id#114418

Merged
cmanallen merged 7 commits intomasterfrom
cmanallen/gitlab-quote-project-id
Apr 30, 2026
Merged

fix(integrations): URL-safe quote project_id#114418
cmanallen merged 7 commits intomasterfrom
cmanallen/gitlab-quote-project-id

Conversation

@cmanallen
Copy link
Copy Markdown
Member

@cmanallen cmanallen commented Apr 30, 2026

GitLab accepts integer project-ids and project-ids formatted as org-name/repo-name[0]. If given as the latter we need to escape the slash otherwise it resolves to an unknown path in GitLab.

This fixes a regression introduced in: #107216
The Sentry error can be found here: https://sentry.sentry.io/issues/7437099703/?project=1&referrer=issue-list&statsPeriod=7d

This does not fix any other bugs that may have been introduced by this interface change.

  1. https://docs.gitlab.com/api/rest/#namespaced-paths

@cmanallen cmanallen requested review from a team as code owners April 30, 2026 12:35
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 30, 2026
Copy link
Copy Markdown
Collaborator

@jacquev6 jacquev6 left a comment

Choose a reason for hiding this comment

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

LGTM.

Comment thread src/sentry/integrations/gitlab/client.py
Comment thread src/sentry/integrations/gitlab/client.py
Comment thread src/sentry/integrations/gitlab/client.py Outdated
Comment thread src/sentry/integrations/gitlab/client.py
Comment thread src/sentry/integrations/gitlab/client.py
Comment thread src/sentry/integrations/gitlab/client.py Outdated
Comment thread src/sentry/integrations/gitlab/client.py
Comment thread src/sentry/integrations/gitlab/client.py
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.

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 b3c734d. Configure here.

Comment thread src/sentry/integrations/gitlab/blame.py Outdated
@cmanallen cmanallen merged commit e9d6de5 into master Apr 30, 2026
59 checks passed
@cmanallen cmanallen deleted the cmanallen/gitlab-quote-project-id branch April 30, 2026 14:21
cleptric pushed a commit that referenced this pull request May 5, 2026
GitLab accepts integer project-ids and project-ids formatted as
`org-name/repo-name`[0]. If given as the latter we need to escape the
slash otherwise it resolves to an unknown path in GitLab.

This fixes a regression introduced in:
#107216
The Sentry error can be found here:
https://sentry.sentry.io/issues/7437099703/?project=1&referrer=issue-list&statsPeriod=7d

This does not fix any other bugs that may have been introduced by this
interface change.

0. https://docs.gitlab.com/api/rest/#namespaced-paths
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