pr-check: Don't dupe locked comment

This commit is contained in:
bbhtt
2026-06-09 10:19:10 +05:30
parent fc3c4e640b
commit b4677657b9
+2
View File
@@ -295,6 +295,7 @@ jobs:
if label_exists_any "pr-check-blocked" "blocked" \ if label_exists_any "pr-check-blocked" "blocked" \
&& ! comment_exists_any "$BUILD_SUCCESS_COMMENT" \ && ! comment_exists_any "$BUILD_SUCCESS_COMMENT" \
&& ! comment_exists_any "$LOCKED_COMMENT_PARTIAL" \
&& [ "$(echo "$PR_COMMENTS" | grep -E -c 'Test build.*failed')" -gt 5 ]; then && [ "$(echo "$PR_COMMENTS" | grep -E -c 'Test build.*failed')" -gt 5 ]; then
echo "PR is blocked and too many failing builds. Locking" echo "PR is blocked and too many failing builds. Locking"
gh pr comment "$PR_NUM" --body "$LOCKED_COMMENT" >/dev/null 2>&1 || true gh pr comment "$PR_NUM" --body "$LOCKED_COMMENT" >/dev/null 2>&1 || true
@@ -343,5 +344,6 @@ jobs:
This pull request is marked as blocked and has too many This pull request is marked as blocked and has too many
builds failing. Please build it locally following the builds failing. Please build it locally following the
instructions and push the relevant changes first. instructions and push the relevant changes first.
LOCKED_COMMENT_PARTIAL: "has too many builds failing"
REVIEW_COMMENT_PARTIAL: "This pull request is temporarily marked as blocked as some" REVIEW_COMMENT_PARTIAL: "This pull request is temporarily marked as blocked as some"
DOMAIN_COMMENT_PARTIAL: "The domain to be used for verification is" DOMAIN_COMMENT_PARTIAL: "The domain to be used for verification is"