[DDO-3641] Dependabot and review automation #7
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: Check Two Reviews | |
on: | |
pull_request: | |
types: | |
- opened | |
- edited | |
- reopened | |
- synchronize | |
- ready_for_review | |
- converted_to_draft | |
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]' && github.event.pull_request.draft == false && (steps.reviews.outputs.approved < 2 || steps.reviews.outputs.changes_requested > 0) | |
run: | | |
echo "Insufficient reviews" | |
exit 1 |