mirror of
https://github.com/stan220/flathub.git
synced 2026-09-08 17:28:57 +00:00
lock-prs: Respect leave-open label too
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user