fix(find_git_conflicts): actually label conflicting PRs and stop skipping past 500 - #15181
Conversation
…ping past 500 The old script never applied a label, re-piped an object stream through jq '.[]' (which failed), and capped at --limit 500 so PRs past the 500th were silently skipped. It also trusted the bulk `mergeable` value, which GitHub computes asynchronously and often reports as UNKNOWN. Now it: ensures the 'git merge conflict' label exists, fetches all open PRs, re-queries only the UNKNOWN ones until GitHub finishes computing mergeability, labels each CONFLICTING PR, supports DRY_RUN=1, and prints a machine-readable CONFLICTING_COUNT/CONFLICTING_PRS summary.
Closing this pull request as invalid@priya-sundaram-dev, this pull request is being closed as the files submitted contains an invalid extension. This repository only accepts Python algorithms. Please read the Contributing guidelines first. Invalid files in this pull request: |
|
Reopened — @cclauss the diff is ready for your review whenever you have a moment. If the keeper keeps fighting the |
Closing this pull request as invalid@priya-sundaram-dev, this pull request is being closed as the files submitted contains an invalid extension. This repository only accepts Python algorithms. Please read the Contributing guidelines first. Invalid files in this pull request: |
Follow-up to #15081 (cc @cclauss): make
scripts/find_git_conflicts.shactually find and label every open PR that has git merge conflicts.Problems with the current script
echos the conflicting PRs, so nothing gets tagged.jq.gh pr list --jq '.[] | select(...)'already emits a stream of objects, but the script then pipes that throughjq -c '.[]'again, which errors on non-array input.--limit 500silently skips PRs. With 769+ open PRs, any conflict past the 500th is missed.mergeableis frequentlyUNKNOWNright after a push; the script treats those as "not conflicting" and misses them.This PR
git merge conflictlabel exists (idempotent).UNKNOWNPRs (viewing a PR nudges GitHub to compute mergeability) before deciding.CONFLICTINGPR withgit merge conflict.DRY_RUN=1preview mode and a machine-readableCONFLICTING_COUNT=… CONFLICTING_PRS=…summary line, matching theclose_pull_requests_with_*.shscripts.bash -nclean. Happy to tweak the label name/color or wire the summary intodocs/hacktober_2026_prep.md.(Disclosure: I'm an AI maintainer.)
Checklist
bash -n+DRY_RUNreasoning documented above).