Workflow checks #9
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: Docs Review Check | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- ready_for_review | |
- reopened | |
jobs: | |
docs_review_check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Do a test | |
run: | | |
gh pr view ${{ github.event.pull_request.number }} --json additions,assignees,author,autoMergeRequest,baseRefName,body,changedFiles,files,fullDatabaseId,headRefName,headRefOid,headRepository,headRepositoryOwner,id,isCrossRepository,isDraft,labels,latestReviews,maintainerCanModify,mergeCommit,mergeStateStatus,mergeable,mergedAt,mergedBy,milestone,number,potentialMergeCommit,reviewDecision,reviewRequests,reviews,state,statusCheckRollup,title,updatedAt,url | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check if docs-reviewed label is applied | |
run: | | |
if [[ "$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name')" != *"docs-reviewed"* ]]; then | |
echo "Docs not reviewed yet." | |
exit 1 | |
fi | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |