answered from live GitHub & Hugging Face data

How can I implement a disclosure policy for AI-generated pull requests in my GitHub repository?

Verdict: A pull request template alone is a disclosure request, not a disclosure policy. Pair it with a commit trailer and a required CI check.

I could not search GitHub for example AI-contribution policies because the search tool hit a rate limit. The steps below rely on GitHub Docs, git's reference, and the Linux kernel's written rules.

Step 1: Add a PR template with a disclosure section

  1. Create .github/pull_request_template.md in your default branch. GitHub shows this template in every new pull request body. (GitHub Docs)
  2. Add a section that asks the author to state whether AI tools helped write the change.
  3. Ask for the tool name and the parts affected. Keep the question short so authors answer it.

The template is self-declared. Contributors can skip or misstate it.

Step 2: Require a machine-readable trailer in each commit

Use a commit trailer for the record. Git reads trailers from the end of a commit message. A trailer is a key-value line in a block that follows a blank line. (git-interpret-trailers)

The Linux kernel uses this format:

Assisted-by: LLM [TOOL1] [TOOL2] (Linux kernel: AI Coding Assistants)

The kernel also sets two rules:

Adopt the Assisted-by key and the same two rules. Your policy then works for both humans and agents.

Step 3: Enforce the policy in CI

  1. Write a CI check that reads each commit message in the pull request.
  2. Fail the check if a commit lacks the trailer. Fail it if an AI agent adds Signed-off-by.
  3. Add a required status check with a repository ruleset. Rulesets can require status checks before a merge. (GitHub Docs: available rules for rulesets)
  4. Apply the ruleset to your default branch.

A local commit-msg hook helps contributors. CI is the real gate, because hooks can be skipped.

Step 4: Write the policy down

Add a CONTRIBUTING.md section. Include:

Caveats

Recommendation

Use the PR template, the Assisted-by trailer, and a required CI check together. Each one covers a gap in the others.

githug covers the agent side of this. Its agent commits name the accountable human, the agent, and the run in trailers. Its hug CLI sets this up for agents that run git. The service is in beta and free to use.

docs.kernel.org/process/coding-assistants.htmldocs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repositorygit-scm.com/docs/git-interpret-trailersdocs.github.com/en/pull-requests/reference/managing-and-standardizing-pull-requests
Answered live from GitHub & Hugging Face · anthropic/claude-haiku-5.5 · 10/19/2026

Ask your own open-source question →