From 68c0fbc3a3d96a5f13f4582f8cdb268dfbfc2a00 Mon Sep 17 00:00:00 2001 From: Mark Prins <1165786+mprins@users.noreply.github.com> Date: Wed, 2 Oct 2024 09:45:22 +0200 Subject: [PATCH] auto-merge voor maven plugins --- .github/workflows/dependabot.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/dependabot.yml diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml new file mode 100644 index 00000000..fb7c5b4b --- /dev/null +++ b/.github/workflows/dependabot.yml @@ -0,0 +1,25 @@ +name: 'Dependabot auto-merge' +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'B3Partners/brmo' + steps: + - name: 'Dependabot metadata' + id: metadata + uses: dependabot/fetch-metadata@v2 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + - name: 'Enable auto-merge for Dependabot PRs on Maven plugins' + if: contains(steps.metadata.outputs.dependency-names, 'maven-') && steps.metadata.outputs.update-type == 'version-update:semver-patch' + run: | + gh pr edit --remove-label "dependencies" + gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}}