sentry-cli releases and GitLab integration
- Dominant language
- Python
- Stars
- 44.8k
- Forks
- 4.9k
- Avg merge
- 21h 10m
- Merged PRs (30d)
- 635
Description
### Problem Statement
Currently with `sentry-cli releases` I need to use the repo_name_with_spaces as part of the `--commit @` syntax to specify a specific commit for a GitLab repository. The spaces worry me since they require a lot of escaping to be done correctly in the GitLab CI scripts and `sentry-cli` code itself. Experience has shown me this can be very error prone in scripts due to shell escapes and whatnot.
### Solution Brainstorm
The possibility to use something like `--commit \"${CI_PROJECT_PATH}@${CI_COMMIT_SHA}\"` with `sentry-cli releases` so that it can take the `CI_PROJECT_PATH` value, e.g. `apps/ourrepo`, and use it with the data in Sentry's GitLab integration to match against the repo URLs (so, GitLab base URL + CI_PROJECT_PATH).
This way a [pre-defined GitLab CI/CD variable](https://docs.gitlab.com/ci/variables/predefined_variables/) can be used and the potential problems with spaces in a repository name can be avoided. It also avoids having to hardcode another variable in the GitLab project's CI/CD variables holding the repository name with spaces, meaning another manual fix whenever a repo might move or get renamed. Using the `CI_PROJECT_PATH` would keep doing the right thing once the GitLab integration is fully synced with GitLab.
### Product Area
Releases
Contributor guide
Research direction
Start at the sentry-cli releases command and its --commit handling, then trace how the GitLab integration matches repository URLs. Verify the behavior with a GitLab CI_PROJECT_PATH-style value containing a path rather than a repository name with spaces, and confirm that release commit lookup succeeds without shell-escaping workarounds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- gitlab, python
- Domain
- cli, devops, release
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100