Skip to content

Commit 67d5a87

Browse files
vaindclaude
andauthored
feat!: Change updater pr-strategy default to 'update' (#124)
* feat!: Change updater pr-strategy default to 'update' BREAKING CHANGE: The default value for pr-strategy has been changed from 'create' to 'update'. Previously, the updater would create separate PRs for each dependency version. Now it maintains a single PR that gets updated with new versions. To preserve the previous behavior, explicitly set pr-strategy: create in your workflow configuration. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * docs: Update changelog with detailed instructions for pr-strategy change and workflow updates * docs: Add pull request reference to breaking change for updater pr-strategy --------- Co-authored-by: Claude <[email protected]>
1 parent 45bc4f7 commit 67d5a87

File tree

3 files changed

+52
-38
lines changed

3 files changed

+52
-38
lines changed

CHANGELOG.md

Lines changed: 49 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,57 @@
44

55
### Breaking Changes
66

7-
Updater and Danger reusable workflows are now composite actions ([#114](https://github.com/getsentry/github-workflows/pull/114))
7+
- Updater: The default value for `pr-strategy` has been changed from `create` to `update`. ([#124](https://github.com/getsentry/github-workflows/pull/124))
8+
This change means the updater will now maintain a single PR that gets updated with new dependency versions (instead of creating separate PRs for each version).
9+
If you want to preserve the previous behavior of creating separate PRs, explicitly set `pr-strategy: create` in your workflow:
810

9-
To update your existing Updater workflows:
10-
```yaml
11-
### Before
12-
native:
13-
uses: getsentry/github-workflows/.github/workflows/updater.yml@v2
11+
```yaml
12+
- uses: getsentry/github-workflows/updater@v3
1413
with:
15-
path: scripts/update-sentry-native-ndk.sh
16-
name: Native SDK
17-
secrets:
18-
# If a custom token is used instead, a CI would be triggered on a created PR.
19-
api-token: ${{ secrets.CI_DEPLOY_KEY }}
20-
21-
### After
22-
native:
23-
runs-on: ubuntu-latest
24-
steps:
25-
- uses: getsentry/github-workflows/updater@v3
26-
with:
27-
path: scripts/update-sentry-native-ndk.sh
28-
name: Native SDK
29-
api-token: ${{ secrets.CI_DEPLOY_KEY }}
30-
```
31-
32-
To update your existing Danger workflows:
33-
```yaml
34-
### Before
35-
danger:
36-
uses: getsentry/github-workflows/.github/workflows/danger.yml@v2
37-
38-
### After
39-
danger:
40-
runs-on: ubuntu-latest
41-
steps:
42-
- uses: getsentry/github-workflows/danger@v3
43-
```
14+
# ... other inputs ...
15+
pr-strategy: create # Add this to preserve previous behavior
16+
```
17+
18+
In case you have existing open PRs created with the `create` strategy, you will need to remove these old branches
19+
manually as the new name would be a prefix of the old PRs, which git doesnt' allow.
20+
21+
- Updater and Danger reusable workflows are now composite actions ([#114](https://github.com/getsentry/github-workflows/pull/114))
22+
23+
To update your existing Updater workflows:
24+
```yaml
25+
### Before
26+
native:
27+
uses: getsentry/github-workflows/.github/workflows/updater.yml@v2
28+
with:
29+
path: scripts/update-sentry-native-ndk.sh
30+
name: Native SDK
31+
secrets:
32+
# If a custom token is used instead, a CI would be triggered on a created PR.
33+
api-token: ${{ secrets.CI_DEPLOY_KEY }}
34+
35+
### After
36+
native:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: getsentry/github-workflows/updater@v3
40+
with:
41+
path: scripts/update-sentry-native-ndk.sh
42+
name: Native SDK
43+
api-token: ${{ secrets.CI_DEPLOY_KEY }}
44+
```
45+
46+
To update your existing Danger workflows:
47+
```yaml
48+
### Before
49+
danger:
50+
uses: getsentry/github-workflows/.github/workflows/danger.yml@v2
51+
52+
### After
53+
danger:
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: getsentry/github-workflows/danger@v3
57+
```
4458

4559
### Features
4660

updater/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ jobs:
129129
* default: Dependencies
130130
* `pr-strategy`: How to handle PRs.
131131
Can be either of the following:
132-
* `create` (default) - create a new PR for new dependency versions as they are released - maintainers may merge or close older PRs manually
133-
* `update` - keep a single PR that gets updated with new dependency versions until merged - only the latest version update is available at any time
132+
* `create` - create a new PR for new dependency versions as they are released - maintainers may merge or close older PRs manually
133+
* `update` (default) - keep a single PR that gets updated with new dependency versions until merged - only the latest version update is available at any time
134134
* `target-branch`: Branch to use as base for dependency updates. Defaults to repository default branch if not specified.
135135
* type: string
136136
* required: false

updater/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ inputs:
2828
pr-strategy:
2929
description: 'How to handle PRs - can be either "create" (create new PRs for each version) or "update" (keep single PR updated with latest version)'
3030
required: false
31-
default: 'create'
31+
default: 'update'
3232
target-branch:
3333
description: 'Branch to use as base for dependency updates. Defaults to repository default branch if not specified.'
3434
required: false

0 commit comments

Comments
 (0)