diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 840da337..309a9f75 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,6 +6,11 @@ updates: schedule: interval: "weekly" time: "10:00" + groups: + minor-patch: + update-types: + - "minor" + - "patch" commit-message: prefix: "chore" include: "scope" @@ -16,6 +21,11 @@ updates: schedule: interval: "weekly" time: "10:00" + groups: + minor-patch: + update-types: + - "minor" + - "patch" commit-message: prefix: "chore" include: "scope" @@ -26,6 +36,11 @@ updates: schedule: interval: "weekly" time: "10:00" + groups: + minor-patch: + update-types: + - "minor" + - "patch" commit-message: prefix: "chore" include: "scope" diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml new file mode 100644 index 00000000..3bec14b1 --- /dev/null +++ b/.github/workflows/auto-merge.yml @@ -0,0 +1,26 @@ +name: Dependabot auto-merge + +on: + pull_request: + +permissions: read-all + +jobs: + dependabot: + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@c9c4182bf1b97f5224aee3906fd373f6b61b4526 # v1.6.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Enable auto-merge for Dependabot PRs + if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch' }} + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}