You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add feature to disable pull requests on a repository #84
Like disabling Wiki and Issues in the project's Settings view I would like to be able to disable pull requests on a repository.
This will be very useful for projects which have only a mirror on GitHub and they DON'T want to use GitHub's pull request mechanism for accepting contributions.
Or a project open sourced by a company is in the process of accepting GitHub pull requests but not yet, they still have some work to do internally before they are ready. (e.g. Google's TensorFlow project used to not accept pull requests through GitHub at the very beginning, but now they do)
Mirror examples:
Linux kernel - 92 people wasted their time sending pull requests because they haven't read how to contribute to the Linux kernel guide
Qt project - GitHub is only used as a mirror and not accepting contributions through it, they use their own Gerrit instance
kdeconnect-kde - GitHub is only used as a mirror and not accepting contributions through it
kdeconnect-android - GitHub is only used as a mirror and not accepting contributions through it
And many others... the maintainer(s) of the project have to tell people every time that submitting pull requests through GitHub is NOT the way to contribute to the project, and to keep telling them to read the contributing guidelines and close their pull request:
Having the option to disable pull requests on a project would solve this problem.
Reacted by Chris Rebert, Miraculous Ladybugreport, Jason Caldwell, Eike, Bartek Igielski, Doğan Çelik, John Vandenberg, Anton Larionov, Lieuwe Rooijakkers, geor-g and 767 more
Reacted by Luca Adrian L, num0005 and Salif Mehmed
Reacted by David Refoua, Tomas Votruba, Дмитрий Океаний, Phani Rithvij, conn, Nate Anderson, d83, William Lahti, Aqil Contractor, Farbfetzen and 8 more
Reacted by Adrian Sieber, MikeTheWatchGuy, Somraj Saha, Nate Anderson, Kyle Lamy, Pavle Radosavljević, d83, Yusuf T., Jan Bösenberg, Aqil Contractor and 26 more
Reacted by Dominik Salvet, Kyle Lamy, stephen304, Aqil Contractor, Renan, Karuppiah Natarajan, Agnès ZITTE, Chris Allen Lane, Paul, Luracasmus and 1 more
changed the title [-]Add feature to be able to disable pull requests on a repository[/-][+]Add feature to disable pull requests on a repository[/+]on Jan 17, 2016
Issues and pull requests are often created without any adherence to the CONTRIBUTING.md contribution guidelines, due to the inconspicuous nature of the “guidelines for contributing” link when creating an issue and the fact that it often contains a lot of information that isn’t relevant to opening issues
I feel dear-github is talking about the concerns of open source maintainers. But this one is a huge concern for drive-by contributors like myself. My profile is full of repos that are forks for one-off contributions, and I can't clearly indicate their second-class nature, nor can I highlight the repos that I do want to welcome contributions to. Being able to disable accepting pull requests would help for this purpose.
Reacted by Tom Seddon, Lindsey Smith, Yarin Licht, Marty Thierry, Olga Dmitricenko, Carlo Alberto Ferraris, Christian Weiske, Joao Renno, Anton Bershanskiy, Daniel Micay and 57 more
My profile is full of repos that are forks for one-off contributions, and I can't clearly indicate their second-class nature, nor can I highlight the repos that I do want to welcome contributions to. Being able to disable accepting pull requests would help for this purpose.
Agreed. Ideally, in this case, an option that redirects PRs to the upstream fork would be the best possible outcome.
Reacted by Stargator, Arnav Borborah, José Cage , Janek, Thomas van den Berg, James May, Bendik, Alan Baines, Pete Morgan, William Rehwinkel and 8 more
Reacted by Stargator, Arnav Borborah, Alan Baines and Abscadaba
Reacted by Pharap, Moritz Maxeiner, Stefan Hagen, Chris Allen Lane, Paulo Borges, a-n-d-a-i, Eddie Carswell, Dima Pulkinen, Andrew Shay, Willixau and 2 more
Forked repos should likely be handled differently than the original. If you just want to contribute forking seems too heavy weight.
Reacted by Dale Wijnand, Roland Illig, Yuze Jiang, Tomáš Hübelbauer, Aqil Contractor, Luca Zeuch, AzureRaptor, Christer Jensen, Eddie Carswell, Dima Pulkinen and 1 more
This would be also extremely helpful for a repo set up for a company's coding challenge. I've had issues with candidates in the past putting up a PR to our repo instead of forking ours and putting the PR on their repo. Once a PR is created, our repo is effectively spoiled, since any future candidates simply have to look at the closed PRs and see all the solutions people have written in the past. There's no way (that I've found) to remove them. Preventing them would be great.
Reacted by Jenny Miller, Sibiraj, Alsciende, Jeff Escalante, tobii-amo, Gabriel Cebrian, Martin Urban, Kyle Lamy, Tomáš Hübelbauer, Aqil Contractor and 18 more
Reacted by Kyle Lamy, Aqil Contractor, Fran Navarro Alcaraz, Adam Tankanow, nithilak, Simon Vandamme, Bilge Yücel, Luis Imperial and MadRey
@ehamiter The only way that I know is that you simply mirror here and host somewhere else.
Gitea lets you hide the status and mirrored Github instances cant accept Pull-Requests.
Is there a way to disable pull requests on a particular branch to the main/master branch? If so, please help me how to configure this, thanks in advance.
Looking for this to. We want to have the development branch to be without pr
This Action subscribes to pull_request_target events. When receiving a pull_request_target event, this action closes the pull request triggered by the event immediately.
Reacted by Pharap, Stephen Walker-Weinshenker, éclairevoyant and kurtekat
This Action subscribes to pull_request_target events. When receiving a pull_request_target event, this action closes the pull request triggered by the event immediately.
But if the repo is a code challenge, the "answer" will keep in "closed pull request"
In this case, it's not enough to disable pull requests. You'd have to disable forking entirely.
Use a private repo, and disable forking on it. Invite only the challenged to view the repo. Publish the repo only after the challenge is complete. Or IDK, maybe you have something else in mind. Is this a challenge that's open to the whole world?
Other services might suit this use case better actually.
PS: Dear GitHub, please add feature to disable pull requests on a repository. You can literally just put a checkbox in Settings > Features and hide the tab if checked...
In that case, you'd have to disable cloning also, which is impossible. However, there's tons of other valid use cases to disable PRs on a repo, so it doesn't really matter that that single use case doesn't really work.
Reacted by kurtekat, Chris Allen Lane, devraza, Hadar Schindler, Emerson Castaneda, Andrew Shay, Paul, Jérémy Coatelen, James Lott, Brian Rayburn and 7 more
Activity
[-]Add feature to be able to disable pull requests on a repository[/-][+]Add feature to disable pull requests on a repository[/+]aeneasr commentedon Jan 18, 2016
Wouldn't this be covered by this?
cvrebert commentedon Jan 19, 2016
Surprisingly, https://github.com/isaacs/github/issues doesn't seem to have an issue for this yet (or my search-fu is failing me).
albfan commentedon Dec 5, 2016
Look for the solution adopted by @GNOME https://mail.gnome.org/archives/desktop-devel-list/2016-November/msg00043.html
cron to the rescue!
Flimm commentedon Jan 12, 2017
I feel
dear-githubis talking about the concerns of open source maintainers. But this one is a huge concern for drive-by contributors like myself. My profile is full of repos that are forks for one-off contributions, and I can't clearly indicate their second-class nature, nor can I highlight the repos that I do want to welcome contributions to. Being able to disable accepting pull requests would help for this purpose.CAFxX commentedon Mar 3, 2017
Agreed. Ideally, in this case, an option that redirects PRs to the upstream fork would be the best possible outcome.
yihui commentedon Jun 21, 2017
I'm tired of asking users not to submit pull requests to a repo I forked, too, e.g., https://github.com/yihui/roxygen2/pulls
aliqasemzadeh commentedon Dec 25, 2017
I need this feature too.
I think it is good.
clarkbw commentedon Dec 25, 2017
Forked repos should likely be handled differently than the original. If you just want to contribute forking seems too heavy weight.
ehamiter commentedon Jan 8, 2018
This would be also extremely helpful for a repo set up for a company's coding challenge. I've had issues with candidates in the past putting up a PR to our repo instead of forking ours and putting the PR on their repo. Once a PR is created, our repo is effectively spoiled, since any future candidates simply have to look at the closed PRs and see all the solutions people have written in the past. There's no way (that I've found) to remove them. Preventing them would be great.
ShalokShalom commentedon Jan 18, 2018
👍 +1
ShalokShalom commentedon Jan 18, 2018
@ehamiter The only way that I know is that you simply mirror here and host somewhere else.
Gitea lets you hide the status and mirrored Github instances cant accept Pull-Requests.
ve3 commentedon Jan 23, 2018
I want this too.
TomasVotruba commentedon Jan 29, 2018
This would be awesome for all monorepos that are on the rise in PHP world in last 2 years
54 remaining items
whitespacecode commentedon Dec 22, 2022
Looking for this to. We want to have the development branch to be without pr
ugreg commentedon Feb 6, 2023
This workaround could be useful until there support in the repo settings to disable PRs.
https://github.com/marketplace/actions/close-pull-request
kennyma-eplus commentedon Mar 2, 2023
But if the repo is a code challenge, the "answer" will keep in "closed pull request"
ngdangtu-vn commentedon Oct 19, 2023
Wake me up when the feature arrives.
ADTC commentedon Oct 20, 2023
In this case, it's not enough to disable pull requests. You'd have to disable forking entirely.
Use a private repo, and disable forking on it. Invite only the challenged to view the repo. Publish the repo only after the challenge is complete. Or IDK, maybe you have something else in mind. Is this a challenge that's open to the whole world?
Other services might suit this use case better actually.
PS: Dear GitHub, please add feature to disable pull requests on a repository. You can literally just put a checkbox in Settings > Features and hide the tab if checked...
ljharb commentedon Oct 20, 2023
In that case, you'd have to disable cloning also, which is impossible. However, there's tons of other valid use cases to disable PRs on a repo, so it doesn't really matter that that single use case doesn't really work.
quanah commentedon Jan 9, 2024
The OpenLDAP project mirror is another case where we do not want PR's to be made via GitHub.
It is currently impossible to disable pull requests on Github
a-n-d-a-i commentedon Feb 24, 2024
bump
ryubal-sh commentedon Apr 12, 2024
It's only been 8 years, c'mon we can do this guys
fatso83 commentedon Aug 21, 2024
From isaacs/GitHub
Just use the official channel
fatso83 commentedon Aug 21, 2024
Upvote the feature here
https://github.com/orgs/community/discussions/8907
PaulNewton commentedon Feb 7, 2026
Currently relevant "Exploring Solutions to Tackle Low-Quality Contributions on GitHub"
https://github.com/orgs/community/discussions/185387
younsl commentedon Feb 14, 2026
Hi, this feature has finally arrived! GitHub has introduced new repository settings for configuring pull request access.