From f85a07426b4cfbc5ac38482e1a1bcd76e5a15c5d Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Wed, 10 Jan 2024 16:06:37 -0500 Subject: [PATCH] Approve and label dependabot pull requests --- .github/workflows/dependabot-auto-merge.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index e18f0b4..1eb3eaf 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -14,20 +14,26 @@ jobs: - name: Dependabot metadata id: dependabot-metadata uses: dependabot/fetch-metadata@v1.6.0 - - name: Approve and merge Dependabot patch updates + + - name: Approve and label updates + run: | + gh pr review --approve "$PR_URL" + gh pr edit --add-label "cleanup-no-release-required" "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Merge Dependabot patch updates if: ${{steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch'}} run: | - gh pr review --approve "$PR_URL" - gh pr edit --add-label "cleanup-no-release-required" "$PR_URL" gh pr merge --auto --merge "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Approve and merge Dependabot minor updates + + - name: Merge Dependabot minor updates if: ${{steps.dependabot-metadata.outputs.update-type == 'version-update:semver-minor'}} run: | - gh pr review --approve "$PR_URL" - gh pr edit --add-label "cleanup-no-release-required" "$PR_URL" gh pr merge --auto --merge "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}}