Fix/package-updates #22
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Dependabot Auto-Approve | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| auto-approve: | |
| runs-on: ubuntu-latest | |
| if: github.actor == 'dependabot[bot]' | |
| steps: | |
| - name: Fetch Dependabot metadata | |
| id: metadata | |
| uses: dependabot/fetch-metadata@v2 | |
| with: | |
| github-token: "${{ secrets.GITHUB_TOKEN }}" | |
| # Auto-approve patch updates to reduce friction | |
| # Still requires CI to pass and manual merge for production dependencies | |
| - name: Auto-approve patch updates | |
| if: steps.metadata.outputs.update-type == 'version-update:semver-patch' | |
| run: gh pr review --approve "$PR_URL" | |
| env: | |
| PR_URL: ${{ github.event.pull_request.html_url }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # Only auto-merge for DEVELOPMENT dependencies (test tools, linters, etc.) | |
| # Production/runtime dependencies still require manual merge after CI passes | |
| - name: Enable auto-merge for dev dependency patches only | |
| if: | | |
| steps.metadata.outputs.update-type == 'version-update:semver-patch' && | |
| steps.metadata.outputs.dependency-type == 'direct:development' | |
| run: gh pr merge --auto --squash "$PR_URL" | |
| env: | |
| PR_URL: ${{ github.event.pull_request.html_url }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |