Skip to content

Forbid AI authored commits#682

Merged
cberner merged 1 commit into
masterfrom
ban
May 14, 2026
Merged

Forbid AI authored commits#682
cberner merged 1 commit into
masterfrom
ban

Conversation

@cberner

@cberner cberner commented May 14, 2026

Copy link
Copy Markdown
Owner

No description provided.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d7f90f1fd3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .github/workflows/ci.yml
jobs:
commit-authors:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Run AI-author gate on pushes to master

The workflow triggers on both pull_request and push, but this job is hard-gated to PR events (if: github.event_name == 'pull_request'), so direct pushes to master bypass the AI-author check completely. In repositories where maintainers can push directly (or automation pushes without a PR), AI-authored commits can still land despite the stated policy.

Useful? React with 👍 / 👎.

Comment thread .github/workflows/ci.yml
run: |
git fetch --no-tags --no-recurse-submodules origin "$BASE_SHA"
offenders=$(git log --no-merges --pretty=format:'%H %an <%ae> committed by %cn <%ce>' "$BASE_SHA".."$HEAD_SHA" \
| grep -iE '(claude|codex)' || true)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Match bot identities precisely in author filter

The grep pattern '(claude|codex)' is a broad substring match across author and committer names/emails, so legitimate humans or domains containing these strings (for example, a person named Claude) will fail CI even when no AI tool authored the commit. This makes the check over-blocking and likely to reject valid contributions.

Useful? React with 👍 / 👎.

@cberner cberner merged commit 2bdfbc5 into master May 14, 2026
9 checks passed
@cberner cberner deleted the ban branch May 14, 2026 16:55
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.

1 participant