diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml index 8187a9a..30c2af5 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -15,6 +15,16 @@ jobs: uses: dependabot/fetch-metadata@v1 with: github-token: "${{ secrets.GITHUB_TOKEN }}" + - name: Add a label for all production dependencies + if: steps.metadata.outputs.dependency-type == 'direct:production' + run: gh pr edit "$PR_URL" --add-label "production" + env: + PR_URL: ${{github.event.pull_request.html_url}} + - name: Approve a PR + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Enable auto-merge for Dependabot PRs if: contains(steps.metadata.outputs.dependency-names, 'my-dependency') && steps.metadata.outputs.update-type == 'version-update:semver-patch' run: gh pr merge --auto --merge "$PR_URL"