lock-prs: Exempt locking prs marked as stale

This commit is contained in:
bbhtt
2024-11-02 09:44:19 +05:30
parent 947c269bfe
commit 10aac87c56
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -15,8 +15,10 @@ jobs:
for num in $cmd; do
if [ "$(gh api repos/$REPO/issues/$num --jq '.active_lock_reason'| wc -c)" -le 1 ]; then
echo "Locking pull request $num"
gh pr lock --repo "$REPO" --reason "resolved" "$num"
if ! gh pr view --repo "$REPO" --json labels -q '.labels[].name' $num|grep -qE "^Stale$"
echo "Locking pull request $num"
gh pr lock --repo "$REPO" --reason "resolved" "$num"
fi
fi
done
env:
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.FLATHUBBOT_TOKEN }}
stale-pr-message: "This PR hasn't received any updates in a year and will be automatically closed in 30 days. If you still plan to work on this please comment saying so."
stale-pr-message: "This PR hasn't received any updates in a year and will be automatically closed in 30 days. If you still plan to work on this please comment or re-open the PR."
days-before-stale: -1
days-before-close: -1
days-before-pr-stale: 365