mirror of
https://github.com/stan220/flathub.git
synced 2026-09-08 16:28:52 +00:00
pr-check: Remove awaiting-review when review comments are/were posted
This commit is contained in:
@@ -68,6 +68,9 @@ jobs:
|
|||||||
|
|
||||||
PR_LABELS="$(gh pr view "$PR_NUM" --json labels -q '.labels[].name')"
|
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
|
BLOCKED=0
|
||||||
|
|
||||||
comment_exists() {
|
comment_exists() {
|
||||||
@@ -177,6 +180,10 @@ jobs:
|
|||||||
gh pr comment "$PR_NUM" --body "$LOCKED_COMMENT"
|
gh pr comment "$PR_NUM" --body "$LOCKED_COMMENT"
|
||||||
gh pr lock "$PR_NUM" || true
|
gh pr lock "$PR_NUM" || true
|
||||||
fi
|
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
|
done
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user