From 4fa0d6b75d232168d03d71b295a75204f14d4534 Mon Sep 17 00:00:00 2001 From: bbhtt Date: Wed, 24 Dec 2025 18:28:12 +0530 Subject: [PATCH] pr-check: Fix some minor bugs --- .github/workflows/pr-check.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 789f175..8722c83 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -88,12 +88,12 @@ jobs: PR_TITLE=$(echo "$json" | jq -r .title) NORMALIZED_PR_BODY=$(printf "%s\n" "$PR_BODY" | tr -d '\r') - unset "$PR_TITLE" + unset PR_TITLE export PR_TITLE="$PR_TITLE" EXIT_CODE=$(curl -sSL "$SCRIPT_URL" | python3 | grep 'EXIT_CODE=' | cut -d= -f2) echo "EXIT_CODE is $EXIT_CODE" - unset "$PR_TITLE" + unset PR_TITLE PR_COMMENTS="$(gh pr view "$PR_NUM" --json comments -q '.comments[] | select(.author.login == "flathubbot" or .author.login == "github-actions") | .body')" @@ -129,6 +129,7 @@ jobs: } PR_THREAD_COUNT=$(get_unresolved_review_threads flathub flathub $PR_NUM) + PR_THREAD_COUNT=${PR_THREAD_COUNT:-0} PR_FILES=$(gh pr view "$PR_NUM" --json files --jq '.files[].path') @@ -185,7 +186,7 @@ jobs: fi } - if [ "$CONTAINS_MASTER" = "true" ]; then + if [ "${CONTAINS_MASTER:-false}" = "true" ]; then echo "PR contains commits from master branch" REVIEW_COMMENT_LINES+=("- PR does not contain commits from the [master branch](https://github.com/flathub/flathub/commits/master/)") BLOCKED=1