Commit e5eeb8b
fix(releases): handle partial SHAs correctly in commit resolution (#2734)
Fixes commit resolution failures that caused "Unable to fetch commits"
errors in Sentry when using partial SHAs with `sentry-cli releases
set-commits`.
- Partial SHAs like `f915d32` are now passed to the API without padding,
allowing single partial SHAs and ranges of partial SHAs to be
successfully associated with a release.
- Ensures SHAs are >=64 chars long, same as the backend (no validation
for minimum length or hexademical).
- Drop support for specifying commits via branch names (an undocumented
feature that relied on the repo being checked out locally).
Fixes #2064
Fixes CLI-55
Fixes REPLAY-413
Before (commit associations with partial SHAs fail, as denoted by the
lack of profile pic for the top 2 releases where I used partial SHAs):
<img width="1220" height="425" alt="Screenshot 2025-09-15 at 5 00 46 PM"
src="https://github.com/user-attachments/assets/341864a0-a738-40e8-823c-67cc22498588"
/>
After (commit associations with partial SHAs now work; note the profile
pics for the top 2 releases are now present):
<img width="1220" height="425" alt="Screenshot 2025-09-15 at 5 11 59 PM"
src="https://github.com/user-attachments/assets/eded5a15-5dc0-4579-a122-1c9ddea734b4"
/>
---------
Co-authored-by: Daniel Szoke <7881302+szokeasaurusrex@users.noreply.github.com>1 parent 8e5d60a commit e5eeb8b
2 files changed
+51
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
56 | | - | |
| 57 | + | |
57 | 58 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
69 | 67 | | |
70 | 68 | | |
71 | 69 | | |
| |||
83 | 81 | | |
84 | 82 | | |
85 | 83 | | |
| 84 | + | |
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
93 | | - | |
94 | 92 | | |
95 | 93 | | |
96 | 94 | | |
| |||
105 | 103 | | |
106 | 104 | | |
107 | 105 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
119 | 133 | | |
120 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
121 | 141 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
| 142 | + | |
128 | 143 | | |
129 | 144 | | |
130 | | - | |
| 145 | + | |
131 | 146 | | |
| 147 | + | |
| 148 | + | |
132 | 149 | | |
133 | 150 | | |
134 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
0 commit comments