[DDO-3641] Dependabot and review automation #3
Workflow file for this run
This file contains 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: Review Check | |
on: | |
pull_request: | |
branches: | |
- main | |
pull_request_review: | |
types: | |
- edited | |
- dismissed | |
- submitted | |
branches: | |
- main | |
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]' && (steps.reviews.outputs.approved < 2 || steps.reviews.outputs.changes_requested > 0) | |
run: | | |
echo "Insufficient reviews" | |
exit 1 |