Skip to content

Commit 4019a4f

Browse files
authored
fix: adding auto merge capabilities to all (#33)
* fix: adding auto merge capabilities to all * chore: updating docs
1 parent d163ffb commit 4019a4f

File tree

8 files changed

+61
-19
lines changed

8 files changed

+61
-19
lines changed

circleci-orbs/README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,16 @@ jobs:
3333
3434
## :gear: Inputs
3535
36-
| Input | Description | Required | Default |
37-
| ---------------------- | -------------------------------- | ------------------ | ---------------------- |
38-
| `base-branch` | Base branch for the pull request | :white_check_mark: | `main` |
39-
| `token` | GitHub token for authentication | :x: | `${{ github.token }}` |
40-
| `branch-prefix` | Prefix for the update branch | :x: | `update-orbs` |
41-
| `pr-title` | Title for the pull request | :x: | `Update CircleCI Orbs` |
42-
| `commit-message` | Commit message for the update | :x: | `Update CircleCI orbs` |
43-
| `circleci-config-file` | Path to CircleCI config file | :x: | `.circleci/config.yml` |
44-
| `yq-version` | Version of yq tool to use | :x: | `v4.44.1` |
36+
| Input | Description | Required | Default |
37+
| ---------------------- | --------------------------------------------------- | ------------------ | ---------------------- |
38+
| `base-branch` | Base branch for the pull request | :white_check_mark: | `main` |
39+
| `token` | GitHub token for authentication | :x: | `${{ github.token }}` |
40+
| `branch-prefix` | Prefix for the update branch | :x: | `update-orbs` |
41+
| `pr-title` | Title for the pull request | :x: | `Update CircleCI Orbs` |
42+
| `commit-message` | Commit message for the update | :x: | `Update CircleCI orbs` |
43+
| `circleci-config-file` | Path to CircleCI config file | :x: | `.circleci/config.yml` |
44+
| `yq-version` | Version of yq tool to use | :x: | `v4.44.1` |
45+
| `auto-merge` | Wether automatic merge should be enabled for the PR | :x: | `false` |
4546

4647
## :warning: Prerequisites
4748

circleci-orbs/action.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ inputs:
3838
description: 'Version of yq to use'
3939
default: 'v4.44.1'
4040

41+
auto-merge:
42+
required: false
43+
description: 'Whether a successful PR should be automatically merged'
44+
default: 'false'
45+
4146
runs:
4247
using: 'composite'
4348
steps:
@@ -143,3 +148,11 @@ runs:
143148
---
144149
145150
*Generated by the CircleCI Orbs Update action* :sparkles:
151+
152+
- name: Auto-merge Pull Request
153+
if: inputs.auto-merge == 'true'
154+
uses: alchemaxinc/composite-toolbox/merge-pr@v1
155+
with:
156+
token: ${{ inputs.token }}
157+
merge-method: 'squash'
158+
pull-request-number: ${{ steps.open-pr.outputs.pr_number }}

golang/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ jobs:
2828
2929
## :gear: Inputs
3030
31-
| Input | Description | Required | Default |
32-
| ---------------- | -------------------------------- | ------------------ | ---------------------------- |
33-
| `base-branch` | Base branch for the pull request | :white_check_mark: | `main` |
34-
| `token` | GitHub token for authentication | :x: | `${{ github.token }}` |
35-
| `branch-prefix` | Prefix for the update branch | :x: | `update-dependencies` |
36-
| `pr-title` | Title for the pull request | :x: | `Update Golang Dependencies` |
37-
| `commit-message` | Commit message for the update | :x: | `Update Golang dependencies` |
31+
| Input | Description | Required | Default |
32+
| ---------------- | --------------------------------------------------- | ------------------ | ---------------------------- |
33+
| `base-branch` | Base branch for the pull request | :white_check_mark: | `main` |
34+
| `token` | GitHub token for authentication | :x: | `${{ github.token }}` |
35+
| `branch-prefix` | Prefix for the update branch | :x: | `update-dependencies` |
36+
| `pr-title` | Title for the pull request | :x: | `Update Golang Dependencies` |
37+
| `commit-message` | Commit message for the update | :x: | `Update Golang dependencies` |
38+
| `auto-merge` | Wether automatic merge should be enabled for the PR | :x: | `false` |
3839

3940
## :warning: Prerequisites
4041

golang/action.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ inputs:
2828
description: 'The commit message for the update'
2929
default: 'Update Golang dependencies'
3030

31+
auto-merge:
32+
required: false
33+
description: 'Whether a successful PR should be automatically merged'
34+
default: 'false'
35+
3136
runs:
3237
using: 'composite'
3338
steps:
@@ -86,3 +91,11 @@ runs:
8691
---
8792
8893
*Generated by the Go Dependencies Update action* :sparkles:
94+
95+
- name: Auto-merge Pull Request
96+
if: inputs.auto-merge == 'true'
97+
uses: alchemaxinc/composite-toolbox/merge-pr@v1
98+
with:
99+
token: ${{ inputs.token }}
100+
merge-method: 'squash'
101+
pull-request-number: ${{ steps.open-pr.outputs.pr_number }}

npm/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
| `commit-message` | Commit message for the update | :x: | `Update NPM dependencies` |
4040
| `excluded-packages` | Comma-separated list of packages to exclude | :x: | - |
4141
| `relock` | Wether `package-lock.json` should be regenerated | :x: | `false` |
42-
| `automerge` | Wether automatic merge should be enabled for the PR | :x: | `false` |
42+
| `auto-merge` | Wether automatic merge should be enabled for the PR | :x: | `false` |
4343

4444
## :warning: Prerequisites
4545

npm/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ inputs:
3737
description: 'Whether package-lock.json should be regenerated, even if no other updates are available'
3838
default: 'false'
3939

40-
automerge:
40+
auto-merge:
4141
required: false
4242
description: 'Whether a successful PR should be automatically merged'
4343
default: 'false'
@@ -127,7 +127,7 @@ runs:
127127
*Generated by the NPM Dependencies Update action* :sparkles:
128128
129129
- name: Auto-merge Pull Request
130-
if: inputs.automerge == 'true'
130+
if: inputs.auto-merge == 'true'
131131
uses: alchemaxinc/composite-toolbox/merge-pr@v1
132132
with:
133133
token: ${{ inputs.token }}

terraform/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
| `working-dir` | Working directory for Terraform | :white_check_mark: | - |
4848
| `var-file-path` | Path to Terraform variables file | :white_check_mark: | - |
4949
| `backend-config` | Backend configuration value for `terraform init -backend-config=` | :x: | - |
50+
| `auto-merge` | Wether automatic merge should be enabled for the PR | :x: | `false` |
5051

5152
## :gear: How It Works
5253

terraform/action.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ inputs:
4040
required: true
4141
description: 'Working directory for Terraform'
4242

43+
auto-merge:
44+
required: false
45+
description: 'Whether a successful PR should be automatically merged'
46+
default: 'false'
47+
4348
runs:
4449
using: 'composite'
4550
steps:
@@ -115,3 +120,11 @@ runs:
115120
---
116121
117122
*Generated by the Terraform Dependencies Update action* :sparkles:
123+
124+
- name: Auto-merge Pull Request
125+
if: inputs.auto-merge == 'true'
126+
uses: alchemaxinc/composite-toolbox/merge-pr@v1
127+
with:
128+
token: ${{ inputs.token }}
129+
merge-method: 'squash'
130+
pull-request-number: ${{ steps.open-pr.outputs.pr_number }}

0 commit comments

Comments
 (0)