diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 8a5a24c..ad4bf69 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -106,6 +106,7 @@ jobs: CONTAINS_MASTER=$(gh api repos/$GH_REPO/pulls/$PR_NUM/commits --jq '.[1] | (.commit.author.email == "mclasen@redhat.com" and .commit.message == "Add some instructions")') BLOCKED=0 + CHECKLIST_FAILED=0 REVIEW_COMMENT_LINES=() gh pr view $PR_NUM --json isDraft --jq '.isDraft' | grep -q false && \ @@ -167,11 +168,11 @@ jobs: if [ "$CHECKLIST_PRESENT" -eq 0 ]; then echo "No checklist present in PR body" - REVIEW_COMMENT_LINES+=("- All [checklists](https://github.com/flathub/flathub/blob/master/.github/pull_request_template.md?plain=1) are completed") + CHECKLIST_FAILED=1 BLOCKED=1 elif [ "$UNCHECKED" -gt 0 ]; then echo "Checklist incomplete in PR body" - REVIEW_COMMENT_LINES+=("- All [checklists](https://github.com/flathub/flathub/blob/master/.github/pull_request_template.md?plain=1) are completed") + CHECKLIST_FAILED=1 BLOCKED=1 fi @@ -180,10 +181,14 @@ jobs: if [ -z "$REQUIRED_CHECKED" ]; then echo "Required checklist not found in PR body" - REVIEW_COMMENT_LINES+=("- All [checklists](https://github.com/flathub/flathub/blob/master/.github/pull_request_template.md?plain=1) are completed") + CHECKLIST_FAILED=1 BLOCKED=1 fi + if [ "$CHECKLIST_FAILED" -eq 1 ]; then + REVIEW_COMMENT_LINES+=("- All [checklists](https://github.com/flathub/flathub/blob/master/.github/pull_request_template.md?plain=1) are completed") + fi + echo "BLOCKED is set to $BLOCKED" if [ "$BLOCKED" -eq 0 ]; then