Skip to content

Dependabot approval and code review workflow #29

Dependabot approval and code review workflow

Dependabot approval and code review workflow #29

name: Dependabot Review & Approve
on:
pull_request:
# types:
# - opened
branches:
- '**'
permissions:
pull-requests: write
checks: read
jobs:
run:
name: Request Code Review & Approve PR if checks pass
runs-on: ubuntu-latest
# if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- name: Request Code Review on Slack
uses: slackapi/slack-github-action@v2.1.0
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
"text": "Please review ${{ github.event.pull_request.html_url }}"
- name: Ensure all checks passing before auto approval
uses: poseidon/wait-for-status-checks@v0.6.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
delay: 300s
interval: 60s
timeout: 900s
ignore: 'Request Code Review & Approve PR if checks pass'
- name: Approve PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}