Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.
This repository was archived by the owner on Oct 23, 2026. It is now read-only.

Support path/subdirectory filtering in releases set-commits for monorepo setups #1156

Closed

Description

@dalnoki

Problem Statement

Currently, sentry-cli releases set-commits associates commits at the repository level only. The --commit flag accepts REPO@SHA or REPO@prev-sha..current-sha but has no option to filter commits by path or subdirectory.

For monorepo setups where multiple apps share a single repository, this means a release for a specific app (e.g. an Expo mobile app) will include commits from unrelated areas of the repo (e.g. backend, web) within the same range.

Solution Brainstorm

No response

Activity

  1. linear-code commented on Jun 25, 2026

    @linear-code
  2. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Jun 25, 2026
  3. szokeasaurusrex commented on Jun 29, 2026

    @szokeasaurusrex
    Member

    I am transferring this issue over to the repository for our new Sentry CLI, as that CLI also supports release creation, but does not yet appear to support the subdirectory filtering requested here.

  4. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Jun 29, 2026
  5. added
    enhancement
    on Jun 29, 2026
  6. betegon commented on Jun 29, 2026

    @betegon
    Member

    thanks for filling this @dalnoki . We're working on it, we'll probably introduce it with a --path to be able to do something like --path apps/mobile and multiple paths with separated commas --path apps/mobile,apps/shared

  7. betegon commented on Jun 29, 2026

    @betegon
    Member

    just merged this @dalnoki ! you can try it out by upgrading to our nightly channel: sentry cli upgrade nightly.

    for context, every commit go into nightly first. Once we cut a release, it gets promoted to the stable channel, so this will be available there soon too.

    Let us know if you find it useful!

  8. ryanpato commented on Jun 29, 2026

    @ryanpato

    thanks for filling this @dalnoki . We're working on it, we'll probably introduce it with a --path to be able to do something like --path apps/mobile and multiple paths with separated commas --path apps/mobile,apps/shared

    Thanks for the quick turnaround @betegon! Will this likely make it into the next release this week? 0.39.0?

  9. betegon commented on Jun 29, 2026

    @betegon
    Member

    @ryanpato Yes! we'll do a release this week. we like to try new stuff in nightly for a bit just in case. It will be out in 0.39.0, exactly.

    Let us know if you would want some other feats in the CLI!

  10. ryanpato commented on Jul 1, 2026

    @ryanpato

    I was testing the nightly build and wonder if this can fit our use case. I'm trying to associate commits from our last app release (per environment) up to our current, filtering by files changed. E.g.

    I was hoping for something like:

    last_release_tag=app-release-staging-tag-123
    current_release_tag=app-release-staging-tag-456
    
    sentry release create org/version
    
    sentry release set-commits org/version \
      --commit $last_release_tag...$current_release_tag \
      --path apps/app1,apps/app2
    

    Due to --commit being a hard error, i'm not sure how I would best achieve this? It works without of course, but if I set a large depth, is it smart enough to know what was included in the last release to ensure we have everything?

    I've got a backup API version where I create the payload myself, but it's little verbose.

    *Additionally sorry — sentry release set-commits org/version --clear doesn't seem to work in the currently nightly 0.39.0-dev.1782750614

  11. betegon commented on Jul 6, 2026

    @betegon
    Member

    Hey @ryanpato !

    1. --clear was broken, fixed on fix(release): make set-commits --clear actually clear commits #1196 . already in nightly.
    2. Your flow: use --from $last_release_tag --path apps/app1,apps/app2 (local git, explicit tag..HEAD range). Coming in feat(release): add --from to scope set-commits to a local range #1197

    So i'd work like:

    sentry release set-commits org/version --from "$last_release_tag" --path apps/app1,apps/app2

    We can't do --commit ... --path as commits sends a ref range to sentry which expands it server-side via our github repo integration, and our API doesn't have the concept of --path, the path argument works locally. But the approach above should let you achieve your goal

  12. added a commit that references this issue on Aug 18, 2026
    b34a052
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions