pr-check: Fix some minor bugs

This commit is contained in:
bbhtt
2025-12-24 18:28:12 +05:30
parent f3d01f3123
commit 4fa0d6b75d
+4 -3
View File
@@ -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