Github currently does not allow disabling creation of Pull Requests. And some people
- either do not read the description on Github ("Github mirror of ... - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)"
- or do not understand what that actually means ("go to Wikimedia Gerrit!") because mirror mirror on the wall, I can still PR after all
- and probably not all mirrored repositories on Github even have that line (I added it to dozens of repos a few months ago) because it's manual; cf T136863: Should Wikimedia have standard policies for managing github mirror repos? and T114616: Review and update GitHub mirror repo descriptions with standard text
Hence there are PRs by new contributors rotting in Github: Authors do not know that noone will ever notice these PRs, and maintainers/stewards don't know about these PRs.
I cannot quantify how many patches have been ignored so far, as I have no idea how to make the search query identify and ignore canonical repos. See T237470: Create and maintain somehow a list of repos mastered in GitHub (and in Phabricator Diffusion) and T109939: For mirrored GitHub repositories, actually give the canonical source Gerrit URL in the repo description.
One way to deal with this is to add a pull request template to github telling the user that this is not the correct place for submitting patches and a link to the relevant bugzilla page.
The way to add a pull request template is by creating a file .github/PULL_REQUEST_TEMPLATE in the repository. As the repos on github are just mirrors such a file would have to go into upstream git.
There are also CONTRIBUTING.md files, of course.
But all of this is on a per-repo level which is cumbersome with thousands of repos.
- Have a bot which automatically closes pull requests and tells people what to do.
- Make the message include similar stuff which is posted on Gerrit patches by Gerrit-newcomer-bot
- Next-level bonus points for somehow getting these patches into Gerrit when closing the Github PR. (Gerrit Patch Uploader, API, etc)
See an example at https://github.com/GNOME/gimp/pull/24#issuecomment-578557470
According to https://wiki.gnome.org/Sysadmin/GitHub ,
Behind the automatic closures of Pull Requests is the close_pull_requests.py script that runs daily at midnight. The script was originally announced on the desktop-devel mailing list in November 2016.