Unfortunately, github has no option to disable pull requests. Thus, folks can create them, leading to a bad situation: a) no one monitors those, so a chance to engage a new contributor is lost or b) additional folks need to be granted admin privileges, which opens a door for accidental synchronization issues we'd rather avoid. Bug 1205299 arose from discovering there were folks doing (b) :)
The "best" solution would be to convince github to offer the ability to disable pull requests for specific repositories. Absent that, there appears to be prior art for "auto close": https://github.com/ImJasonH/nopullrequests
Thank you for filing this :-) GitHub support has been very helpful in the past when I've contacted them, so worth a try at least :-) https://github.com/contact
Per github, there is currently only API support for closing a pull request (or issue), not for locking it. (And no support for disabling PR for a repo either.)
https://github.com/mozilla/github-org-scripts/pull/10 has a solution that worked on the following open PRs: https://github.com/mozilla/gecko-dev/pull/70 https://github.com/mozilla/gecko-dev/pull/68 https://github.com/mozilla/gecko-dev/pull/66 https://github.com/mozilla/gecko-projects/pull/1
Assignee: nobody → hwine
Status: NEW → ASSIGNED
The default message is: Pull requests not accepted. Please see CONTRIBUTING. Which "should" work for most OSS repos. The message can be over-ridden on a per-repository basis.
This is now implemented in https://github.com/mozilla/github-org-scripts/blob/master/close_pull_requests.py
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.