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: specify separate targets for dev and production (#572)
* feat: add additional target options for dev and production dependencies
* feat: adjust for proper naming and priority of target-* values
* feat: add tests for target-* changes
* fix: refactor logic and improve documentation
|`github-token`| No |`${{github.token}}`| A GitHub token. |
26
26
|`exclude`| No || A comma or semicolon separated value of packages that you don't want to auto-merge and would like to manually review to decide whether to upgrade or not. |
27
27
|`approve-only`| No |`false`| If `true`, the PR is only approved but not merged. |
28
28
|`merge-method`| No |`squash`| The merge method you would like to use (squash, merge, rebase). |
29
29
|`merge-comment`| No |`''`| An arbitrary message that you'd like to comment on the PR after it gets auto-merged. This is only useful when you're receiving too much of noise in email and would like to filter mails for PRs that got automatically merged. |
30
30
|`use-github-auto-merge`| No |`false`| If `true`, the PR is marked as auto-merge and will be merged by GitHub when status checks are satisfied.<br /><br />_NOTE_: This feature only works when all of the following conditions are met.<br />- The repository enables auto-merge. <br />- The pull request base must have a branch protection rule. <br />- The pull request's status checks are not yet satisfied.<br /></br>Refer to [the official document](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request) about GitHub auto-merge. |
31
31
|`target`| No |`any`| A flag to only auto-merge updates based on Semantic Versioning.<br />Possible options are: `major, premajor, minor, preminor, patch, prepatch, prerelease, any`.<br /><br />The value of this flag allows for updates for all the matching versions **and lower** with the respect for priority. This means, for example, if the `target` is set to `major` and the update is made to `minor` version the auto-merge will be triggered.<br /><br />For more details on how semantic version difference is calculated please see [semver](https://www.npmjs.com/package/semver) package.<br /><br />If you set a value other than `any`, PRs that are not semantic version compliant are skipped. An example of a non-semantic version is a commit hash when using git submodules. |
32
+
|`target-development`| No || Same as `target` but specifies semver for `development` dependencies only. If present, then it overrides the value in `target` for `development` dependencies. |
33
+
|`target-production`| No || Same as `target` but specifies semver for `production` dependencies only. If present, then it overrides the value in `target` for `production` dependencies. |
32
34
|`pr-number`| No || A pull request number, only required if triggered from a workflow_dispatch event. Typically this would be triggered by a script running in a separate CI provider. See [Trigger action from workflow_dispatch event](#trigger-action-from-workflow_dispatch-event) example. |
33
35
|`skip-commit-verification`| No |`false`| If `true`, then the action will not expect the commits to have a verification signature. It is required to set this to `true` in GitHub Enterprise Server. |
34
36
|`skip-verification`| No |`false`| If true, the action will not validate the user or the commit verification status |
| merge_status | The result status of the merge. It can be one of the following: `approved`, `merged`, `merge_failed`, `skipped:commit_verification_failed`, `skipped:not_a_dependabot_pr`, `skipped:cannot_update_major`, `skipped:bump_higher_than_target`, `skipped:packaged_excluded`|
41
43
42
44
## Examples
@@ -93,6 +95,27 @@ steps:
93
95
approve-only: true
94
96
```
95
97
98
+
### Specifying target versions
99
+
100
+
#### Specifying target for all packages
101
+
102
+
```yml
103
+
steps:
104
+
- uses: fastify/github-action-merge-dependabot@v3
105
+
with:
106
+
target: 'minor'
107
+
```
108
+
109
+
#### Specifying target for development and production packages separately
110
+
111
+
```yml
112
+
steps:
113
+
- uses: fastify/github-action-merge-dependabot@v3
114
+
with:
115
+
target-development: 'major'
116
+
target-production: 'minor'
117
+
```
118
+
96
119
### Trigger action from workflow_dispatch event
97
120
98
121
If you need to trigger this action manually, you can use the [`workflow_dispatch`](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch) event. A use case might be that your CI runs on a seperate provider, so you would like to run this action as a result of a successful CI run.
0 commit comments