From fe66996fb7a945ae30cad8624fccf257208f350c Mon Sep 17 00:00:00 2001 From: Arbli Troshani Date: Mon, 20 Nov 2023 10:59:00 +0100 Subject: [PATCH] disable auto-merge for dependency bumps with major version 0 (#204) Done to adhere to semantic versioning guidelines, which state that patch and minor bumps in dependencies with major version 0 can potentially contain breaking changes. https://semver.org/#spec-item-4 --- .github/workflows/template_automerge_dependabot.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/template_automerge_dependabot.yml b/.github/workflows/template_automerge_dependabot.yml index 37a360ec..3c1f9ee4 100644 --- a/.github/workflows/template_automerge_dependabot.yml +++ b/.github/workflows/template_automerge_dependabot.yml @@ -37,7 +37,10 @@ jobs: github-token: ${{ steps.get_token.outputs.token }} - name: Enable auto-merge for Dependabot PRs - if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' + if: >- + (steps.metadata.outputs.update-type == 'version-update:semver-patch' || + steps.metadata.outputs.update-type == 'version-update:semver-minor') && + !startsWith(steps.metadata.outputs.previous-version, '0.') run: | gh pr review --approve "$PR_URL"