mirror of
https://github.com/stan220/flathub.git
synced 2026-09-08 17:28:57 +00:00
lock-prs: Get all updated PRs then filter to first 100
This commit is contained in:
@@ -11,7 +11,7 @@ jobs:
|
||||
steps:
|
||||
- name: Lock closed PRs
|
||||
run: |
|
||||
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')
|
||||
cmd=$(gh pr list --repo "$REPO" -L 100000 --state closed --json number,updatedAt|jq '[.[] | select(.updatedAt >= (now - (7 * 24 * 60 * 60) | todate))] | sort_by(.updatedAt) | .[] | {number: .number, updatedAt: .updatedAt}'| jq '.number'|head -n 100)
|
||||
|
||||
for num in $cmd; do
|
||||
if [ "$(gh api repos/$REPO/issues/$num --jq '.active_lock_reason'| wc -c)" -le 1 ]; then
|
||||
|
||||
Reference in New Issue
Block a user