You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 <noreply@anthropic.com>
* 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 <noreply@anthropic.com>
* 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 <noreply@anthropic.com>
* 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 <noreply@anthropic.com>
* 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 <noreply@anthropic.com>
* 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 <noreply@anthropic.com>
* 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 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,7 @@ To update your existing Danger workflows:
44
44
45
45
### Features
46
46
47
+
- Updater now supports filtering releases by GitHub release title patterns, e.g. to support release channels ([#117](https://github.com/getsentry/github-workflows/pull/117))
47
48
- Updater now supports dependencies without changelog files by falling back to git commit messages ([#116](https://github.com/getsentry/github-workflows/pull/116))
48
49
- Danger - Improve conventional commit scope handling, and non-conventional PR title support ([#105](https://github.com/getsentry/github-workflows/pull/105))
49
50
- Add Proguard artifact endpoint for Android builds in sentry-server ([#100](https://github.com/getsentry/github-workflows/pull/100))
Copy file name to clipboardExpand all lines: updater/README.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,17 @@ jobs:
32
32
pattern: '^1\.'# Limit to major version '1'
33
33
api-token: ${{ secrets.CI_DEPLOY_KEY }}
34
34
35
+
# Update to stable releases only by filtering GitHub release titles
36
+
cocoa-stable:
37
+
runs-on: ubuntu-latest
38
+
steps:
39
+
- uses: getsentry/github-workflows/updater@v3
40
+
with:
41
+
path: modules/sentry-cocoa
42
+
name: Cocoa SDK (Stable)
43
+
gh-title-pattern: '\(Stable\)$'# Only releases with "(Stable)" suffix
44
+
api-token: ${{ secrets.CI_DEPLOY_KEY }}
45
+
35
46
# Update a properties file
36
47
cli:
37
48
runs-on: ubuntu-latest
@@ -91,6 +102,10 @@ jobs:
91
102
* type: string
92
103
* required: false
93
104
* default: ''
105
+
* `gh-title-pattern`: RegEx pattern to match against GitHub release titles. Only releases with matching titles will be considered. Useful for filtering to specific release channels (e.g., stable releases).
106
+
* type: string
107
+
* required: false
108
+
* default: ''
94
109
* `changelog-entry`: Whether to add a changelog entry for the update.
0 commit comments