mirror of
https://github.com/Drop-OSS/flathub-app-bin.git
synced 2026-07-01 12:43:45 -04:00
pr-check: Don't add duplicate review comments
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user