Skip to content

[DDO-3641] Dependabot and review automation #6

[DDO-3641] Dependabot and review automation

[DDO-3641] Dependabot and review automation #6

name: Check Two Reviews
on:
pull_request:
branches:
- main
types:
- opened
- reopened
- synchronize
- ready_for_review
- converted_to_draft
jobs:
check-reviews:
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- name: Get review counts
id: reviews
uses: jrylan/github-action-reviews-counter@main
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Fail if insufficient reviews
if: github.actor != 'dependabot[bot]' && github.event.pull_request.draft == false && (steps.reviews.outputs.approved < 2 || steps.reviews.outputs.changes_requested > 0)
run: |
echo "Insufficient reviews"
exit 1