refactor: reduce duplicate reconcile dispatches

This commit is contained in:
okxlin
2026-03-24 11:40:16 +00:00
committed by OpenClaw Bot
parent be3a423a5b
commit d56b5566fa
@@ -2,7 +2,7 @@ name: Reconcile eligible Renovate PRs for automerge
on:
schedule:
- cron: '*/15 * * * *'
- cron: '*/30 * * * *'
workflow_dispatch:
permissions:
@@ -35,9 +35,15 @@ jobs:
fi
mapfile -t pr_numbers < <(
gh pr list --repo "$REPO" --state open --limit 200 \
--json number,author,labels \
--jq '.[] | select(.author.login == "app/renovate" or .author.login == "renovate[bot]") | select(([.labels[].name] | index("renovate-auto")) | not) | .number'
gh pr list --repo "$REPO" --state open --limit 100 \
--json number,author,labels,isDraft,baseRefName \
--jq '.[]
| select(.author.login == "app/renovate" or .author.login == "renovate[bot]")
| select(.isDraft | not)
| select(.baseRefName == "localApps")
| select(([.labels[].name] | index("renovate-auto")) | not)
| select(([.labels[].name] | index("renovate-auto-reconcile")) | not)
| .number'
)
eligible=()
@@ -112,6 +118,9 @@ jobs:
run: |
while IFS= read -r pr_number; do
[ -n "$pr_number" ] || continue
gh pr edit "$pr_number" \
--repo "$REPO" \
--add-label renovate-auto-reconcile
gh workflow run .github/workflows/renovate-automerge.yml \
--repo "$REPO" \
-f pr_number="$pr_number"