mirror of
https://github.com/Drop-OSS/flathub-app-bin.git
synced 2026-01-30 20:55:22 +01:00
pr-check: Remove awaiting-review when review comments are/were posted
This commit is contained in:
7
.github/workflows/pr-check.yml
vendored
7
.github/workflows/pr-check.yml
vendored
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user