diff --git a/.github/workflows/dependabot-auto.yml b/.github/workflows/dependabot-auto.yml index c13d506..382f492 100644 --- a/.github/workflows/dependabot-auto.yml +++ b/.github/workflows/dependabot-auto.yml @@ -1,4 +1,4 @@ -name: dependabot +name: dependabot auto-merge on: pull_request permissions: @@ -6,24 +6,23 @@ permissions: pull-requests: write jobs: - auto-approve: + dependabot: runs-on: ubuntu-latest if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'sethrylan/bayesian' steps: - name: Dependabot metadata id: metadata - uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a + uses: dependabot/fetch-metadata@v2 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 --merge "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GH_TOKEN: ${{secrets.GITHUB_TOKEN}} - - name: Approve a PR + - name: Approve Dependabot PR run: gh pr review --approve "$PR_URL" env: - PR_URL: ${{github.event.pull_request.html_url}} - GH_TOKEN: ${{secrets.GITHUB_TOKEN}} - + PR_URL: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.GITHUB_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' + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.repolint.yaml b/.repolint.yaml index 92923c8..e0c7b51 100644 --- a/.repolint.yaml +++ b/.repolint.yaml @@ -9,5 +9,7 @@ checks: reference: "sethrylan/sethrylan/.repolint/workflows/npm-ci.yml" - name: ".github/workflows/conventional-commits.yml" reference: "sethrylan/sethrylan/.repolint/workflows/conventional-commits.yml" + - name: ".github/workflows/dependabot-auto.yml" + reference: "sethrylan/sethrylan/.repolint/workflows/dependabot-auto.yml" - name: "LICENSE" reference: "sethrylan/sethrylan/.repolint/LICENSE"