From 2a2169c261df85075af1b0abcdd2653ccfa21904 Mon Sep 17 00:00:00 2001 From: Souleymene Rouchou Date: Tue, 1 Sep 2026 17:46:40 -0400 Subject: [PATCH] ci: auto-merge Dependabot PRs for patch and minor updates --- .github/workflows/dependabot-auto-merge.yml | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/dependabot-auto-merge.yml diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 00000000..730a9a19 --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,25 @@ +name: dependabot-auto-merge + +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + auto-merge: + runs-on: ubuntu-22.04 + if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'ubisoft/NGitLab' + steps: + - name: Fetch dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + + - name: Enable auto-merge for patch and minor updates + if: steps.metadata.outputs.update-type != 'version-update:semver-major' + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}