Commit b8c061f
fix(build): Skip base_sha and base_ref when equal to head_sha during auto-inference (EME-607) (#2924)
## Summary
This PR modifies `sentry-cli` to skip setting `base_sha` and `base_ref`
when they are auto-inferred and `base_sha` equals `head_sha`.
## Changes
- Added tracking to distinguish between user-provided CLI arguments and
auto-inferred values for `base_sha` and `base_ref`
- When both values are auto-inferred and `base_sha == head_sha`, we now
set both to `None` before sending to the API
- User-provided values via `--base-sha` and `--base-ref` are always
respected regardless of their values
## Rationale
When `base_sha` equals `head_sha`, there is no meaningful comparison
baseline since we'd be comparing a commit against itself. This typically
occurs in certain CI scenarios where the auto-inference logic cannot
determine a proper base commit. By skipping these values, we allow the
backend to handle the comparison more appropriately.
Closes EME-607
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude <[email protected]>1 parent b9f99c1 commit b8c061f
2 files changed
+28
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
234 | 239 | | |
235 | 240 | | |
236 | 241 | | |
| |||
241 | 246 | | |
242 | 247 | | |
243 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
244 | 267 | | |
245 | 268 | | |
246 | 269 | | |
| |||
0 commit comments