Skip to content

Commit fdf34e8

Browse files
committed
feat: add env variable to allow minor / major auto-merges
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
1 parent f0ce225 commit fdf34e8

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

workflow-templates/dependabot-approve-merge.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ jobs:
2626
auto-approve-merge:
2727
if: github.event.pull_request.user.login == 'dependabot[bot]'
2828
runs-on: ubuntu-latest-low
29+
env:
30+
# env variable for maintainers: 'true' allows to auto-merge 1.0.2 -> 2.0.0
31+
ALLOW_MAJOR: false
32+
# env variable for maintainers: 'true' allows to auto-merge 1.0.2 -> 1.1.0
33+
ALLOW_MINOR: true
2934
# env variable for maintainers: RegExp string to ignore some dependencies from auto-approve and auto-merge
3035
IGNORE_PATTERN: ''
3136
permissions:
@@ -88,7 +93,8 @@ jobs:
8893
&& (github.event.action == 'opened' || github.event.action == 'reopened')
8994
&& (
9095
steps.metadata.outputs.update-type == 'version-update:semver-patch'
91-
|| steps.metadata.outputs.update-type == 'version-update:semver-minor'
96+
|| (fromJSON(env.ALLOW_MINOR) && steps.metadata.outputs.update-type == 'version-update:semver-minor')
97+
|| (fromJSON(env.ALLOW_MAJOR) && steps.metadata.outputs.update-type == 'version-update:semver-major')
9298
)
9399
}}
94100
with:

0 commit comments

Comments
 (0)