Hacker News new | ask | show | jobs
by duskwuff 1554 days ago
There is one way to disable pull requests on GitHub: enabling "interaction limits" on the repository. The gotchas are that it disables all interactions, not just pull requests, and it can only be enabled for 6 months at a time.
2 comments

GitHub should have an option to disable PRs for a repo, however:

- Owners are of no obligation to approve, close, merge, or interact with a PR in any way. If you don’t want to merge a PR, just don’t.

- you can include a readme which can include whatever discouragement you want.

- if you have a CONTRIBUTORS.md file, GitHub will show that to first time contributors when they submit a PR.

- I’m sure you could trivially have a GitHub action that will auto close all PRs as soon as they’re submitted.

All of that imply that contributors will read things before hitting the Fork button.
And everything (besides ignoring PRs) requires content to be explicitly added to the repository to configure GitHub's behavior. For some use cases -- like mirrors of repositories hosted elsewhere -- this isn't possible.
If someone's not going to bother themselves with checking the readme or contributors guide before submitting a PR, then they shouldn't be bothered by their PR being ignored or rejected.
What I described is what I believe GitHub should support. Not that they support it today.
Right, I mean that there is a (caveat-ridden) workaround as it stands. I agree that repository maintainers should have the option to restrict or disable pull requests, just like they can disable other features.