lock-prs: Respect leave-open label too

This commit is contained in:
bbhtt
2024-11-06 21:27:18 +05:30
parent 80defad938
commit bd94df47ab
+2 -2
View File
@@ -2,7 +2,7 @@ name: "Lock closed PRs"
on:
schedule:
- cron: "0 */8 * * *"
- cron: "0 */6 * * *"
workflow_dispatch:
workflow_call:
@@ -16,7 +16,7 @@ jobs:
for num in $cmd; do
if [ "$(gh api repos/$REPO/issues/$num --jq '.locked')" = "false" ]; then
if ! gh pr view --repo "$REPO" --json labels -q '.labels[].name' $num|grep -qE "^Stale$"; then
if ! gh pr view --repo "$REPO" --json labels -q '.labels[].name' $num|grep -qE "^(Stale|leave-open)$"; then
echo "Locking pull request $num"
gh pr lock --repo "$REPO" --reason "resolved" "$num"
fi