DEV Community

Discussion on: What are the best practices for accepting PRs?

Collapse
 
evanplaice profile image
Evan Plaice • Edited

Consider Scope

Ask yourself honestly.

"Is it an acceptable addition, does it fit within the project's intended functionality?"

It's OK to reject a PR if it goes in an unwanted direction. OSS projects can suffer from feature creep too if you're not intentional about acxepting contributions.

Review the code

Like review every detail until you understand it fully. Itntakes practice to get good/fast at this but it's a necessary skill for a maintainer.

Document/automate away points of friction

PRs introducing regressions, add tests and require PRs to include tests.

PRs keep introducing stylistic changes that add no value, add linting as a required step. This can waste a LOT of time, especially with inexperienced contributors.

You say dev is done on 'dev', so you follow a specific workflow (ex GitFlow). Document that in CONTRIBUTING.md. While you're at it, document your entire development process in a step-by-step manner that users will understand.

Automate Automate Automate

CI is also a good way to automate all these checks. So every PR pushed to runs through a full suite of checks (ie test, lint, etc).

The more of this you take care of early on, the less effort you'll have to waste later dealing with poor quality contributions.