diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 3372ea5..216bb09 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -25,4 +25,4 @@ - [ ] `README.md` updated (if a command or flag changed) - [ ] Native binary verified (`mvn package -Pnative`) — required if Jackson serialization or dependencies changed - [ ] Commit messages / PR title follow [Conventional Commits](https://www.conventionalcommits.org/) — a `feat`/`fix`/`perf` subject becomes the release note, so `CHANGELOG.md` needs no hand edit -- [ ] I have no more than 2 open, non-draft pull requests in this repository (maintainers and dependency bots are exempt). +- [ ] I have no more than 2 open, non-draft pull requests and no more than 4 open pull requests in total (drafts included) in this repository (maintainers and dependency bots are exempt). diff --git a/.github/workflows/pr-limit.yml b/.github/workflows/pr-limit.yml index 4441d9c..642ad82 100644 --- a/.github/workflows/pr-limit.yml +++ b/.github/workflows/pr-limit.yml @@ -6,6 +6,8 @@ name: PR Limit # # pull_request_target gives the token write access on fork PRs. Neither this workflow # nor the reusable one checks out or runs PR code; they only call the GitHub API. +# contents: write is needed only for converting a PR back to a draft (the GitHub API +# refuses the token without it). Never add a checkout of the PR head here. on: pull_request_target: @@ -23,6 +25,7 @@ on: default: true permissions: + contents: write issues: write pull-requests: write diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 87ba468..3346f2d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -135,12 +135,12 @@ Do not include `Co-Authored-By` trailers for AI tools in commit messages. Attrib ### Pull Request Limits and Review Bandwidth -To make sure every contribution gets a thorough, high-quality review in a reasonable time, we ask contributors to keep **no more than 2 open, non-draft pull requests** at any time in this repository. +To make sure every contribution gets a thorough, high-quality review in a reasonable time, we ask contributors to keep **no more than 4 open pull requests**, drafts included, at any time in this repository, and **no more than 2 of them ready for review**. - **Why this policy exists:** maintainer review time is limited. Capping concurrent open PRs prevents review backlogs, reduces context switching, and keeps PR cycle times short for everyone. - **Dependent work:** if your work depends on a PR that has not been merged yet, build on that branch or note the dependency in the discussion instead of opening separate, uncoordinated PRs. -- **Draft PRs:** drafts do not count against the limit. Mark a draft as ready for review only when you have review capacity available. -- **How it is applied:** a bot labels your 3rd and later open pull requests `over-pr-limit` with a reminder. Starting **2026-10-08**, from your 5th open pull request onward, new ones are closed automatically. Your branch and commits are kept, and you can reopen the PR once one of your other PRs is merged or closed. Maintainers and dependency bots are not counted. +- **Draft PRs:** drafts do not count against the limit of 2 ready pull requests, but they do count toward the total of 4. You can have, for example, 2 ready and 2 drafts, or 1 ready and 3 drafts. Use drafts for work in progress, not as a queue of finished changes waiting for a review slot, and mark a draft as ready for review only when you have review capacity available. +- **How it is applied:** a bot turns a pull request back into a draft if it would be your 3rd ready for review, and closes a pull request opened while you already have 4 open, drafts included. Your branch and commits are always kept: mark the draft ready again once one of your ready pull requests is merged, closed or turned into a draft, and reopen a closed pull request once you have fewer than 4 open. Maintainers and dependency bots are not counted. Once your current pull requests are reviewed, merged, or closed, you are welcome to open new ones!