answered from live GitHub & Hugging Face data
How can I distinguish AI-generated pull requests from human ones in my GitHub repository?
There is no reliable way to detect AI-written pull requests from the code alone. You can only identify them from markers that the author or the tool adds. The markers I checked are commit trailers, and the Copilot agent's author identity. Those markers depend on the contributor being honest or on the tool adding them.
What you can check
1. Look for an Assisted-by trailer. The Linux kernel uses this trailer for AI help. The format is Assisted-by: LLM [TOOL1] [TOOL2]. The trailer names the model and optional analysis tools, such as coccinelle or sparse. Basic tools such as git and gcc are not listed (kernel AI coding assistant rules).
2. Check who signed off. The kernel rules say AI agents must not add Signed-off-by tags. Only a human can certify the Developer Certificate of Origin. A commit with an Assisted-by trailer and a human Signed-off-by line shows that a person took responsibility (kernel AI coding assistant rules).
3. Check the author and co-author fields. GitHub reads Co-authored-by trailers to attribute commits to more than one person. The trailer must use an email linked to a GitHub account for the commit to count as a contribution (GitHub docs). Some agent tools use a bot identity as the author. You can filter on that identity in your review process.
4. Check the tool that opened the pull request. Copilot cloud agent starts from the Agents tab, the dashboard, or /task in Copilot Chat. It pushes its changes and can open a pull request (GitHub docs). I read the start steps, but I did not confirm how the resulting pull request is labeled. Check a real Copilot pull request in your repository to see its markers.
Limits of these checks
- A contributor can remove or change a trailer. The markers prove only what the author chose to declare.
- A person can paste AI output and leave no marker. Disclosure rules help, but they do not catch every case.
- I could not run a repository search for third-party AI-detection tools. Rate limits blocked those searches, so I cannot recommend one.
Recommendation
Make disclosure a rule, and check the markers in review. Follow the kernel model:
- Require an
Assisted-bytrailer on any commit where an AI tool wrote the code. - Require a human
Signed-off-byor sign-off on every commit. - Ban
Signed-off-byfrom bot accounts in your contribution guide. - Use a required pull request template with an AI-use checkbox.
For agent tools that run git, githug is one option. It is live now. Each agent commits under its own identity. The commit trailers name the accountable human, the agent, and the run. Anyone can check a commit at githug.ai/v. The tool is free during the beta.