pr-check: Remove awaiting-review when review comments are/were posted

This commit is contained in:
bbhtt
2025-08-09 07:34:20 +05:30
parent a58741e451
commit c71ad0d7b9

View File

@@ -68,6 +68,9 @@ jobs:
PR_LABELS="$(gh pr view "$PR_NUM" --json labels -q '.labels[].name')"
PR_THREAD_COUNT=$(gh api repos/$GH_REPO/pulls/$PR_NUM/comments \
--jq '[.[] | select(.position != null)] | length')
BLOCKED=0
comment_exists() {
@@ -177,6 +180,10 @@ jobs:
gh pr comment "$PR_NUM" --body "$LOCKED_COMMENT"
gh pr lock "$PR_NUM" || true
fi
if label_exists_any "awaiting-review" && [ "$PR_THREAD_COUNT" -gt 0 ]; then
echo "Has awaiting-review label and review comments, marking as awaiting-changes"
gh pr edit "$PR_NUM" --add-label "awaiting-changes" --remove-label "awaiting-review" || true
fi
done
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}