andygrove opened a new pull request, #7377:
URL: https://github.com/apache/datafusion-comet/pull/7377

   ## Which issue does this PR close?
   
   Closes #7364.
   
   ## Rationale for this change
   
   The per-repository creation cap in `.asf.yaml` 
(`github.pull_requests.creation_cap`) limits how many PRs an account can have 
open here, but it cannot see activity in other repositories. Accounts that 
bulk-submit PRs across many repositories are a review burden we do not have 
capacity for.
   
   ## What changes are included in this PR?
   
   - Adds `.github/workflows/close_high_volume_prs.yml`. On 
`pull_request_target` (`opened`, `reopened`) it looks up the author's open PRs 
across GitHub and, if they have at least 50 open PRs spread across at least 20 
repositories, comments, applies the `high-volume-account` label and closes the 
PR.
   - Authors with an existing relationship to the project are always skipped: 
owners, members, collaborators, prior contributors, bots, and anyone with a 
merged PR here. A reopen by someone other than the author (a maintainer 
override) is also left alone.
   - The workflow never checks out or runs code from the pull request, which is 
what makes `pull_request_target` safe here. Untrusted values reach the script 
only through environment variables.
   - Optional repository variables tune it: `HIGH_VOLUME_MAX_OPEN_PRS`, 
`HIGH_VOLUME_MAX_REPOS`, `HIGH_VOLUME_ALLOWLIST`, `HIGH_VOLUME_DRY_RUN`.
   - A manual `workflow_dispatch` run scans PRs that are already open. It 
defaults to a dry run that only reports what it would close.
   - Lists the workflow in `.github/workflows/README.md`.
   
   To observe before enforcing, set the repository variable 
`HIGH_VOLUME_DRY_RUN` to `true`.
   
   ## How are these changes tested?
   
   - `actionlint` and `prettier --check` pass on the new file, and 
`dev/ci/check-ci-config.py` passes.
   - I ran the extracted script locally in dry-run mode against real open PRs 
through the GitHub API. With the default thresholds, first-time contributors 
with a few open PRs were left alone. With the thresholds lowered, the script 
reported that it would close the PR. The allowlist and the `MEMBER` association 
both skipped the author.
   - The scan mode and the actual comment, label and close calls were not 
exercised before merge. The script was run on macOS bash 3.2 with two bash 4 
expressions swapped out; the workflow runs on `ubuntu-latest`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to