Skip to content

Update dependency remark-validate-links to v13 #160

Update dependency remark-validate-links to v13

Update dependency remark-validate-links to v13 #160

name: Check approvals
on:
pull_request:
types:
- labeled
- unlabeled
pull_request_review:
jobs:
check-approvals-tooling:
name: Tooling
if: contains(github.event.pull_request.labels.*.name, 'tooling')
runs-on: ubuntu-latest
steps:
- run: |
echo "Approvals required: ${APPROVALS_REQUIRED}"
gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews \
| jq '.[] | "\(.user.login) \(.state)"' \
| uniq \
| grep -c 'APPROVED' \
| xargs test "${APPROVALS_REQUIRED}" -le
env:
GH_TOKEN: ${{ github.token }}
APPROVALS_REQUIRED: 1
check-approvals-rfcs:
name: RFCs
if: "!contains(github.event.pull_request.labels.*.name, 'tooling')"
runs-on: ubuntu-latest
steps:
- run: |
echo "Approvals required: ${APPROVALS_REQUIRED}"
gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews \
| jq '.[] | "\(.user.login) \(.state)"' \
| uniq \
| grep -c 'APPROVED' \
| xargs test "${APPROVALS_REQUIRED}" -le
env:
GH_TOKEN: ${{ github.token }}
APPROVALS_REQUIRED: 3