Strengthen PR requirements to weed out low-effort AI-generated PRs
This commit is contained in:
+29
-4
@@ -30,6 +30,20 @@ Thanks for your interest in contributing to Booklore! Whether you're fixing bugs
|
||||
|
||||
---
|
||||
|
||||
## Before You Start
|
||||
|
||||
> **Issue first, PR second.** Every pull request must be linked to an approved issue. If you want to work on something, [open an issue](https://github.com/booklore-app/booklore/issues/new) (or find an existing one) and wait for a maintainer to approve it before writing code. PRs submitted without a linked, approved issue will be closed.
|
||||
|
||||
This protects both your time and ours. It ensures that the work is actually wanted and that you're heading in the right direction before you invest effort.
|
||||
|
||||
**What will get your PR closed immediately:**
|
||||
- No linked issue
|
||||
- No screenshots or screen recording proving the change works
|
||||
- No test output pasted in the PR
|
||||
- Bulk AI-generated changes that clearly haven't been reviewed or tested
|
||||
- Unsolicited refactors, cleanups, or "improvements" nobody asked for
|
||||
- PRs over 1000+ changed lines (split them up)
|
||||
|
||||
## Where to Start
|
||||
|
||||
Not sure where to begin? Look for issues labeled:
|
||||
@@ -248,12 +262,17 @@ BREAKING CHANGE: OAuth 2.0 is no longer supported
|
||||
|
||||
Before opening your PR:
|
||||
|
||||
- [ ] PR is linked to an **approved** issue (PRs without a linked issue will be closed)
|
||||
- [ ] All tests pass (`./gradlew test` and `ng test`)
|
||||
- [ ] Actual test output is pasted in the PR description
|
||||
- [ ] Code follows project conventions (see [Code Style](#code-style))
|
||||
- [ ] IntelliJ linter shows no errors
|
||||
- [ ] Branch is up-to-date with `develop`
|
||||
- [ ] You ran the full stack locally and manually verified the change works
|
||||
- [ ] PR description includes a screen recording or screenshots proving it works
|
||||
- [ ] PR description explains *what* changed and *why*
|
||||
- [ ] PR is linked to a related issue (if applicable)
|
||||
- [ ] PR contains a single logical change (one bug fix OR one feature)
|
||||
- [ ] No unrelated refactors, style changes, or "improvements" are bundled in
|
||||
- [ ] **PR is reasonably sized.** PRs with 1000+ changed lines will be closed without review. Break large changes into small, focused PRs.
|
||||
- [ ] **For user-facing features:** submit a companion docs PR at [booklore-docs](https://github.com/booklore-app/booklore-docs)
|
||||
|
||||
@@ -261,10 +280,16 @@ Before opening your PR:
|
||||
|
||||
Contributions using AI tools (Copilot, Claude, ChatGPT, etc.) are welcome, but the quality bar is the same as human-written code. **If you ship it, you own it.**
|
||||
|
||||
- **Review every line.** You must be able to explain any part of your change during review.
|
||||
- **Keep PRs focused.** One feature, one fix, or one refactor per PR.
|
||||
- **Scrutinize AI-generated tests.** They often pass trivially without asserting anything meaningful.
|
||||
We've seen a sharp increase in AI-generated PRs where the contributor clearly never ran the code, didn't test it, and can't explain what it does. These waste maintainer time and will be closed on sight.
|
||||
|
||||
**If you use AI to help write code, you must still:**
|
||||
|
||||
- **Run the code yourself.** Build the project, start the full stack, and manually verify the change works. Trusting the AI's output without running it is not acceptable.
|
||||
- **Review every line.** You must be able to explain any part of your change during review. If asked "why did you do X?" and your answer is "the AI suggested it," the PR will be closed.
|
||||
- **Keep PRs focused.** One feature, one fix, or one refactor per PR. Do not submit a dump of everything the AI suggested.
|
||||
- **Scrutinize AI-generated tests.** They often pass trivially without asserting anything meaningful. Tests that don't validate real behavior will be rejected.
|
||||
- **Clean up.** Remove dead code, placeholder comments, empty catch blocks, and unnecessary boilerplate.
|
||||
- **Stay in scope.** Do not submit refactors, style changes, or "improvements" the AI suggested that are outside the scope of the linked issue.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user