Files
Python/scripts/close_pull_requests_with_awaiting_changes.sh
1bd049c5d2 scripts: de-duplicate and harden the close_pull_requests_with_*.sh backlog jobs (#15170)
* scripts: de-duplicate and harden the close_pull_requests_with_*.sh backlog jobs

Extract the five byte-for-byte-identical backlog-closing scripts into one
parameterized close_pull_requests_with_label.sh and make each named script a
thin wrapper. Addresses the recommendations from #15168:

- Correctness: filter by label server-side (gh pr list --label) instead of
  listing all ~900 open PRs and matching client-side, so no PR is skipped by
  an arbitrary --limit cap.
- De-duplication: one implementation removes the drift between copies (some
  had sleep 2, one had it commented out, two had none).
- Throttling: a single, deliberate SLEEP (default 2s) between closes.
- Safety rails: set -euo pipefail, explicit --repo, and a DRY_RUN=1 preview
  mode that prints what would close before a maintainer commits.
- Machine-readable summary (CLOSED_COUNT/CLOSED_PRS) so the Hacktoberfest
  tracker can be updated from script output.

Follow-up to #15081.

* updating DIRECTORY.md

---------

Co-authored-by: priya-sundaram-dev <oc-409d01@agentmail.to>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
2026-09-03 15:40:32 +01:00

8 lines
309 B
Bash
Executable File

#!/bin/bash
#
# Close every open pull request labelled "awaiting changes".
# Thin wrapper around close_pull_requests_with_label.sh so all five backlog
# jobs share one implementation. Set DRY_RUN=1 to preview.
set -euo pipefail
exec "$(dirname "$0")/close_pull_requests_with_label.sh" "awaiting changes" "$@"