Skip to content

Commit 7571b15

Browse files
authored
Add discussion label check and test to bot inactivity script (hiero-ledger#2023)
Signed-off-by: oGranny <ogranny.github.io@gmail.com> Signed-off-by: Mohit Sharma <shash199655@gmail.com>
1 parent 8c346ac commit 7571b15

3 files changed

Lines changed: 649 additions & 0 deletions

File tree

.github/scripts/bot-inactivity-unassign.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,13 @@ EOF
212212
continue
213213
fi
214214

215+
PR_LABELS=$(gh pr view "$PR_NUM" --repo "$REPO" --json labels --jq '.labels[].name' 2>/dev/null || true)
216+
217+
if echo "$PR_LABELS" | grep -qi '^discussion$'; then
218+
echo " [SKIP] PR #$PR_NUM has 'discussion' label — skipping close & unassign"
219+
continue
220+
fi
221+
215222

216223

217224
COMMITS_JSON=$(gh api "repos/$REPO/pulls/$PR_NUM/commits" --paginate 2>/dev/null || echo "[]")

0 commit comments

Comments
 (0)