File tree Expand file tree Collapse file tree 2 files changed +22
-9
lines changed
Expand file tree Collapse file tree 2 files changed +22
-9
lines changed Original file line number Diff line number Diff line change @@ -30,15 +30,16 @@ jobs:
3030
3131## :gear: Inputs
3232
33- | Input | Description | Required | Default |
34- | ------------------- | ------------------------------------------------ | ------------------ | ------------------------- |
35- | ` base-branch` | Base branch for the pull request | :white_check_mark: | `main` |
36- | `token` | GitHub token for authentication | :x : | `${{ github.token }}` |
37- | `branch-prefix` | Prefix for the update branch | :x : | `update-dependencies` |
38- | `pr-title` | Title for the pull request | :x : | `Update NPM Dependencies` |
39- | `commit-message` | Commit message for the update | :x : | `Update NPM dependencies` |
40- | `excluded-packages` | Comma-separated list of packages to exclude | :x : | - |
41- | `relock` | Wether `package-lock.json` should be regenerated | :x : | `false` |
33+ | Input | Description | Required | Default |
34+ | ------------------- | --------------------------------------------------- | ------------------ | ------------------------- |
35+ | ` base-branch` | Base branch for the pull request | :white_check_mark: | `main` |
36+ | `token` | GitHub token for authentication | :x : | `${{ github.token }}` |
37+ | `branch-prefix` | Prefix for the update branch | :x : | `update-dependencies` |
38+ | `pr-title` | Title for the pull request | :x : | `Update NPM Dependencies` |
39+ | `commit-message` | Commit message for the update | :x : | `Update NPM dependencies` |
40+ | `excluded-packages` | Comma-separated list of packages to exclude | :x : | - |
41+ | `relock` | Wether `package-lock.json` should be regenerated | :x : | `false` |
42+ | `automerge` | Wether automatic merge should be enabled for the PR | :x : | `false` |
4243
4344# # :warning: Prerequisites
4445
Original file line number Diff line number Diff line change @@ -37,6 +37,11 @@ inputs:
3737 description : ' Whether package-lock.json should be regenerated, even if no other updates are available'
3838 default : ' false'
3939
40+ automerge :
41+ required : false
42+ description : ' Whether a successful PR should be automatically merged'
43+ default : ' false'
44+
4045runs :
4146 using : ' composite'
4247 steps :
8994 files : ' package.json package-lock.json'
9095
9196 - name : Create Pull Request
97+ id : open-pr
9298 if : steps.check_changes.outputs.has_changes == 'true'
9399 uses : alchemaxinc/composite-toolbox/create-pr@v1
94100 with :
@@ -119,3 +125,9 @@ runs:
119125 ---
120126
121127 *Generated by the NPM Dependencies Update action* :sparkles:
128+
129+ - name : Auto-merge Pull Request
130+ if : inputs.automerge == 'true'
131+ uses : alchemaxinc/composite-toolbox/merge-pr@v1
132+ with :
133+ pull-request-number : ${{ steps.open-pr.outputs.pr_number }}
You can’t perform that action at this time.
0 commit comments