chore(deps-dev): bump prettier in the development-dependencies group … #104
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-merge | ||
| on: | ||
| pull_request: | ||
| types: [opened, reopened] | ||
| pull_request_review: | ||
| types: [submitted] | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| workflows: write | ||
| jobs: | ||
| dependabot: | ||
| runs-on: ubuntu-latest | ||
| if: | | ||
| github.actor == 'dependabot[bot]' || | ||
| (github.event_name == 'pull_request_review' && | ||
| github.event.review.state == 'approved' && | ||
| github.event.pull_request.user.login == 'dependabot[bot]') | ||
| steps: | ||
| - name: Check if PR is approved | ||
| id: check-approval | ||
| run: | | ||
| if [ "$(gh pr view $PR_URL --json reviews --jq '.reviews[].state' | grep -c 'APPROVED')" -gt 0 ]; then | ||
| echo "approved=true" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "approved=false" >> $GITHUB_OUTPUT | ||
| fi | ||
| env: | ||
| PR_URL: ${{github.event.pull_request.html_url}} | ||
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
| - name: Enable auto-merge for approved Dependabot PRs | ||
| if: steps.check-approval.outputs.approved == 'true' | ||
| run: gh pr merge --auto --merge "$PR_URL" | ||
| env: | ||
| PR_URL: ${{github.event.pull_request.html_url}} | ||
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||