answered from live GitHub & Hugging Face data

How can I effectively use labels to classify AI-generated pull requests in GitHub?

MaintActive · 4d ago
Stars2.5k
Releasev7.0.04mo ago
Contrib65
Issues74 open

Use a small, fixed set of labels that record facts you can verify, such as which agent opened the pull request. Do not label based on guesses about whether code looks AI-written. GitHub has no built-in "AI-generated" flag, so your labels are only as reliable as the signal behind them.

Step 1: Create the label set

GitHub lets anyone with write access create labels. Anyone with triage access can apply and remove them. (GitHub Docs: Managing labels)

Use a prefix so the labels group together in the sidebar and in filters. A starting set:

Label Meaning Who applies it
ai:agent Opened by an autonomous coding agent Automation
ai:assisted Human wrote the PR with AI help Reviewer
ai:needs-human-review Agent output not yet reviewed by a person Automation, removed by reviewer
ai:verified-human A named human owns and reviewed the change Reviewer

Deleting a label removes it from every pull request that has it. (GitHub Docs) Rename labels carefully once they are in use.

Step 2: Automate the labels that come from facts

Apply ai:agent from the author or a commit trailer, not from a guess about the diff.

Step 3: Check the community tools before you adopt one

I found several repositories that claim AI-PR labeling. None has enough evidence to adopt:

I did not find a GitHub Docs page that says Copilot's coding agent applies labels to its pull requests. Do not assume it does. Check the pull requests it opens in your repository. (Copilot cloud agent docs)

How they relate

actions/labeler and the community tools solve different problems. actions/labeler sorts pull requests by files. The community tools try to sort by author or content. The first is maintained and verifiable. The second is not yet proven.

Recommendation

  1. Create the four labels above. Use a ai: prefix.
  2. Apply ai:agent from the agent's identity or commit trailer. This is the only reliable signal.
  3. Use actions/labeler for path-based rules, such as a label for changes to auth code.
  4. Make ai:verified-human a merge gate, enforced with branch protection or a required check.

Choose this approach if you want auditable labels. Choose a community tool only after you read its code and confirm it is maintained.

If your agents run git, githug writes commit trailers that name the agent and the accountable human. A workflow can read those trailers to apply ai:agent without guessing.

github.com/JeremyDev87/leonidasgithub.com/dnltz/claude-github-reviewgithub.com/TanishaMehta17/GitGeniegithub.com/chandan0312/Ai-Github-Assistantdocs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labelsgithub.com/actions/labelerdocs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows
Answered live from GitHub & Hugging Face · anthropic/claude-haiku-5.5 · 11/24/2026

Ask your own open-source question →