mirror of
https://github.com/stan220/flathub.git
synced 2026-09-08 17:28:57 +00:00
ci: Lock only if it was not locked before
This commit is contained in:
@@ -17,7 +17,9 @@ jobs:
|
||||
cmd=$(gh pr list --repo "$REPO" -L 100 --state closed --json number,updatedAt|jq '[.[] | select(.updatedAt >= (now - (7 * 24 * 60 * 60) | todate))] | sort_by(.updatedAt) | .[] | {number: .number, updatedAt: .updatedAt}'| jq '.number')
|
||||
|
||||
for num in $cmd; do
|
||||
gh pr lock --repo "$REPO" --reason "resolved" "$num"
|
||||
if [ "$(gh api repos/$REPO/issues/$num --jq '.active_lock_reason'| wc -c)" -le 1 ]; then
|
||||
gh pr lock --repo "$REPO" --reason "resolved" "$num"
|
||||
fi
|
||||
done
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.FLATHUBBOT_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user