getsentry / getsentry/sentry

Allow adding commits to a release

Open
#91,326 1 comment 0 reactions 0 assignees View on GitHub
Waiting for: Product Owner
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
22h 21m
Merged PRs (30d)
586

Description

### Problem Statement

The [`OrganizationReleaseDetails`](https://github.com/getsentry/sentry/blob/efd3bdf63c642a9ac56e097db5929c806b013d9c/src/sentry/api/endpoints/organization_release_details.py#L294) and [`ProjectReleaseDetailsEndpoint`](https://github.com/getsentry/sentry/blob/efd3bdf63c642a9ac56e097db5929c806b013d9c/src/sentry/api/endpoints/project_release_details.py#L23) endpoint's PUT method lack support for adding commits to the release. Instead, when provided with a list of commits, these endpoints overwrite all of the commits already existing on the release.

Most likely, we will want to keep the current behavior, with commits overriding existing commits. However, we should also add the ability to add commits (via another parameter, another endpoint, etc).

### Solution Brainstorm

Most likely, we will want to keep the current behavior, with commits passed to the PUT request overwriting the existing commits. That way, we ensure backwards-compatibility with any API users who expect the API to work this way.

However, we should also add the ability to add commits (via another parameter, another endpoint, etc).

Adding this feature will unblock https://github.com/getsentry/sentry-cli/issues/2499 because we cannot currently add additional commits to an existing release without overwriting the commits that were there before.

### Product Area

Releases

Contributor guide

Open the contributing guide

Research direction

Start by reading the PUT methods in src/sentry/api/endpoints/organization_release_details.py and src/sentry/api/endpoints/project_release_details.py. Trace how the current commits parameter replaces existing commits, then determine an additive API behavior while preserving that compatibility. Done means clients can add commits to an existing release without overwriting its current commits.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.