Commit de9e3fa
feat: Support GitHub release title pattern matching (#117)
* feat: add gh-title-pattern input for release channel filtering
Implements Issue #85 by adding a new `gh-title-pattern` input parameter that allows filtering releases by GitHub release titles using regex patterns.
Features:
- Filter releases by title patterns (e.g., '\(Stable\)$' for stable releases)
- Uses GitHub API to fetch release metadata
- Fully backward compatible when parameter is not specified
- Comprehensive test coverage with error handling
Usage example:
```yaml
uses: getsentry/github-workflows/updater@v3
with:
path: modules/sentry-cocoa
name: Cocoa SDK (Stable)
gh-title-pattern: '\(Stable\)$'
```
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* fix: remove --paginate flag from GitHub API call
The --paginate flag returns separate pages, not combined results.
Using the default API call (first 30 releases) is sufficient for most
repositories when filtering by release title patterns.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* refactor: clean up GitHub release filtering code
Simplify the implementation with:
- Consolidated URL validation with single regex match
- Cleaner variable assignment using tuple unpacking
- Simplified array handling by wrapping API result in @()
- Removed unnecessary null/single object checks
- More concise comments and clearer logic flow
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* refactor: streamline conditional checks and improve code readability in update-dependency.ps1
* refactor: remove unnecessary comment in update-dependency.Tests.ps1
* test: add deterministic test case for specific version matching
- Add test that matches exact release version (2.11.1) by title pattern
- This provides a deterministic test case that verifies exact behavior
- Fix error handling to ensure proper error message when no releases match
- All 4 gh-title-pattern tests now pass
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* docs: add changelog entry for GitHub release title pattern filtering
Documents the new gh-title-pattern feature that allows users to filter
releases by their GitHub release titles using regex patterns.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* fix: set GH_TOKEN env var for GitHub CLI in CI
Ensures that gh api commands work properly in CI environments
by setting the GH_TOKEN environment variable to the provided
api-token input.
This fixes the issue where GitHub release title filtering
would fail silently in CI due to lack of authentication.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* fix: pass GH_TOKEN environment variable to scripts for authentication
* docs: clarify changelog entry for GitHub release title pattern filtering
* fix: set GH_TOKEN environment variable for Invoke-Pester step in CI
* fix: enhance error handling for GitHub releases fetching in update-dependency script
---------
Co-authored-by: Claude <[email protected]>1 parent 1dbbc41 commit de9e3fa
File tree
6 files changed
+166
-79
lines changed- .github/workflows
- updater
- scripts
- tests
6 files changed
+166
-79
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
35 | 46 | | |
36 | 47 | | |
37 | 48 | | |
| |||
91 | 102 | | |
92 | 103 | | |
93 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
94 | 109 | | |
95 | 110 | | |
96 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
107 | 111 | | |
108 | 112 | | |
109 | 113 | | |
110 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
111 | 117 | | |
112 | 118 | | |
113 | 119 | | |
| |||
164 | 170 | | |
165 | 171 | | |
166 | 172 | | |
| 173 | + | |
| 174 | + | |
167 | 175 | | |
168 | 176 | | |
169 | 177 | | |
| |||
223 | 231 | | |
224 | 232 | | |
225 | 233 | | |
| 234 | + | |
226 | 235 | | |
227 | 236 | | |
228 | 237 | | |
| |||
231 | 240 | | |
232 | 241 | | |
233 | 242 | | |
| 243 | + | |
234 | 244 | | |
235 | 245 | | |
236 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
40 | | - | |
41 | | - | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
| 53 | + | |
56 | 54 | | |
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
60 | | - | |
61 | | - | |
| 58 | + | |
62 | 59 | | |
63 | | - | |
64 | | - | |
| 60 | + | |
65 | 61 | | |
66 | 62 | | |
67 | 63 | | |
| |||
82 | 78 | | |
83 | 79 | | |
84 | 80 | | |
85 | | - | |
| 81 | + | |
86 | 82 | | |
87 | 83 | | |
88 | 84 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 85 | + | |
| 86 | + | |
94 | 87 | | |
95 | | - | |
96 | | - | |
| 88 | + | |
97 | 89 | | |
98 | 90 | | |
99 | 91 | | |
100 | | - | |
101 | | - | |
| 92 | + | |
102 | 93 | | |
103 | 94 | | |
104 | | - | |
105 | | - | |
106 | | - | |
| 95 | + | |
107 | 96 | | |
108 | 97 | | |
109 | 98 | | |
110 | | - | |
111 | | - | |
| 99 | + | |
112 | 100 | | |
113 | 101 | | |
114 | 102 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
122 | 106 | | |
123 | 107 | | |
124 | | - | |
125 | | - | |
| 108 | + | |
126 | 109 | | |
127 | 110 | | |
128 | | - | |
129 | | - | |
| 111 | + | |
130 | 112 | | |
131 | 113 | | |
132 | 114 | | |
133 | 115 | | |
134 | 116 | | |
135 | 117 | | |
136 | | - | |
137 | | - | |
| 118 | + | |
138 | 119 | | |
139 | 120 | | |
140 | 121 | | |
141 | | - | |
142 | | - | |
| 122 | + | |
143 | 123 | | |
144 | 124 | | |
145 | 125 | | |
| |||
150 | 130 | | |
151 | 131 | | |
152 | 132 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
| 133 | + | |
| 134 | + | |
157 | 135 | | |
158 | 136 | | |
159 | | - | |
160 | | - | |
| 137 | + | |
161 | 138 | | |
162 | 139 | | |
163 | 140 | | |
164 | 141 | | |
165 | 142 | | |
166 | | - | |
167 | | - | |
168 | | - | |
| 143 | + | |
169 | 144 | | |
170 | 145 | | |
171 | | - | |
172 | | - | |
173 | | - | |
| 146 | + | |
174 | 147 | | |
175 | 148 | | |
176 | 149 | | |
| |||
179 | 152 | | |
180 | 153 | | |
181 | 154 | | |
182 | | - | |
183 | | - | |
| 155 | + | |
184 | 156 | | |
185 | 157 | | |
186 | 158 | | |
187 | 159 | | |
188 | 160 | | |
189 | 161 | | |
190 | 162 | | |
191 | | - | |
192 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
193 | 199 | | |
194 | 200 | | |
195 | 201 | | |
196 | 202 | | |
197 | 203 | | |
198 | 204 | | |
199 | 205 | | |
200 | | - | |
201 | | - | |
| 206 | + | |
202 | 207 | | |
203 | 208 | | |
204 | 209 | | |
| |||
207 | 212 | | |
208 | 213 | | |
209 | 214 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
| 215 | + | |
| 216 | + | |
214 | 217 | | |
215 | 218 | | |
216 | | - | |
217 | | - | |
| 219 | + | |
218 | 220 | | |
219 | 221 | | |
220 | 222 | | |
| |||
224 | 226 | | |
225 | 227 | | |
226 | 228 | | |
227 | | - | |
228 | | - | |
| 229 | + | |
229 | 230 | | |
230 | 231 | | |
231 | 232 | | |
| |||
241 | 242 | | |
242 | 243 | | |
243 | 244 | | |
244 | | - | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
253 | | - | |
| 252 | + | |
254 | 253 | | |
255 | 254 | | |
256 | 255 | | |
257 | 256 | | |
258 | | - | |
259 | | - | |
260 | | - | |
| 257 | + | |
261 | 258 | | |
262 | 259 | | |
263 | 260 | | |
0 commit comments