Skip to content

MNT instruct AI tools to not open pull requests in github PULL_REQUEST_TEMPLATE.md #31643

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

StefanieSenger
Copy link
Contributor

@StefanieSenger StefanieSenger commented Jun 24, 2025

Towards #31679

This PR is a proposal to solve an increasing problem and is up to discussion.

The problem this PR is attempting to solve is that AI tools more and more people use to create PRs don't care about our Automated Contributions Policy. Since GitHub Copilot Coding Agent Has Arrived!, scikit-learn also gets flooded with AI spam. Many people who care about open source are unhappy about it (Allow us to block Copilot-generated issues (and PRs) from our own repositories).

I have tried to link a few examples for maintainers who didn't act as firebrigade in the last weeks in the comment below, but it feels already outdated.

Here is my original PR description that I wrote before learning about the Copilot Coding Agent:

Recently (last few weeks), I have encountered a lot of PRs that I think were either totally or partially generated by AI. These were all of extremely bad quality or irrelevant and I think, once these are out, there is no good way to deal with them while reviewing. I have closed quite some, but that took time, and in others, I have asked the human behind it to modify, but these are rather likely to struggle a lot and then stop replying at one point.

I was thinking that this - or a similar - change on the github PR template might discourage thoughtless AI generated PRs, at least a bit. It is talking directly to the agent and I have used an LLM to phrase it in such a way that an LLM can easily read and understand this. (They obviously like bullet points, clear "do-not ... - unless ..." statements and visual cues, the LLM also explained to me these were important.)

I wonder: is the PR template is the right spot for this kind of instruction, or would another location be more effective? I am not sure where in the process an AI tool would encounter this - if at all.

Copy link

github-actions bot commented Jun 24, 2025

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: b2af442. Link to the linter CI: here

@virchan virchan added RFC and removed RFC labels Jun 25, 2025
@StefanieSenger
Copy link
Contributor Author

StefanieSenger commented Jun 26, 2025

Here is some evidence of the problem.

Examples:
#31581
#31649
#31597
#31602
#31684

Extend:
You can see that there is an increasing amount of partially or fully generated PRs and a decrease in overall quality for PRs by looking at the last closed PRs. Quite some of the authors also spam-open llm-based PRs on other open source projects at the same time.

@reshamas
Copy link
Member

@StefanieSenger Once this wording is refined, the Contributing Guide is another place where it could be added.

@betatim
Copy link
Member

betatim commented Jun 27, 2025

Do you know what tools people are/could be using for this? If we do find out then we could test drive the template to see if it does anything.

Could we move it to the end of the template? That way the message for robots wouldn't take up valuable space at the top. It feels wrong/annoying to optimise for the abusers instead of the good people (who all have to wade through the message till they get to the stuff they should read).

@StefanieSenger
Copy link
Contributor Author

StefanieSenger commented Jun 29, 2025

Do you know what tools people are/could be using for this? If we do find out then we could test drive the template to see if it does anything.

The cause seems to be that GitHub has recently allowed AI generated issues and PRs (and even sells it) via Copilot.
See this community discussion: Allow us to block Copilot-generated issues (and PRs) from our own repositories.

Github even promotes this on its blog: How to create issues and pull requests in record time on GitHub.

I have just added this information in the PR description.

(Though it seems there were ways to generate PRs for a while. I found some "older" instrucions like this medium article from december 2023: Let AI generate Pull Requests from your GitHub issues!.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants