mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-09-29 05:53:07 +08:00
* 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>
8 lines
327 B
Bash
Executable File
8 lines
327 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Close every open pull request labelled "require descriptive names".
|
|
# 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" "require descriptive names" "$@"
|