mirror of
https://github.com/chenasraf/flathub.git
synced 2026-05-18 01:39:06 +00:00
ci: jq is available already
This commit is contained in:
4
.github/workflows/lock-prs.yml
vendored
4
.github/workflows/lock-prs.yml
vendored
@@ -9,15 +9,13 @@ jobs:
|
||||
lock:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get update && sudo apt install -y jq
|
||||
|
||||
- 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')
|
||||
|
||||
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"
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user