Skip to content

add no-ai-marks to the git framework preset - #51

Open
mishan wants to merge 1 commit into
cleder:developfrom
mishan:add-no-ai-marks
Open

add no-ai-marks to the git framework preset#51
mishan wants to merge 1 commit into
cleder:developfrom
mishan:add-no-ai-marks

Conversation

@mishan

@mishan mishan commented Sep 11, 2026

Copy link
Copy Markdown

Description

Adds no-ai-marks to framework/git/preset.yaml, next to gitlint and commitizen. It has two hooks: no-ai-marks-commit-msg (commit-msg stage) rejects AI attribution (Co-authored-by/Assisted-by trailers crediting AI tools, "Generated with ..." footers) and hidden Unicode (zero-width, bidi, tag characters) in commit messages, and no-ai-marks-staged checks the lines being committed for the same. It's for projects whose contribution policy doesn't allow AI attribution. language: python, standard library only, MIT.

Both hooks are category: experimental since the project is new.

Running autoupdate as the checklist asks also bumped three existing hooks in this preset: commit-check v2.15.0 -> v2.17.0, commitizen v4.17.0 -> v4.18.0, and zizmor-pre-commit v1.29.0 -> v1.30.1. I left those in; happy to drop them if you'd rather keep this PR to the one addition.

Disclosure: I'm the author.

Pre-submission checklist

Preset contributions

  • This PR touches exactly one language or framework preset

Run the following commands against the preset file and confirm each passes.

  • pre-commit validate-config <preset-file> passes without errors
  • prek validate-config <preset-file> passes without errors
  • pre-commit autoupdate -c <preset-file> was run and hook revisions are up to date
  • prek autoupdate -c <preset-file> was run and hook revisions are up to date
  • All hooks listed in the preset are publicly available and actively maintained
  • Every hook in this preset has a description field

Code contributions

Not applicable, no changes to gpc_init/ or tests/.

Summary by Sourcery

Add experimental checks for AI attribution and hidden characters while refreshing the Git preset’s existing hook versions.

New Features:

  • Add the experimental no-ai-marks commit-message and staged-change hooks to the Git framework preset.

Enhancements:

  • Update the commit-check, commitizen, and zizmor-pre-commit hooks to newer releases.

@semanticdiff-com

semanticdiff-com Bot commented Sep 11, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  framework/git/preset.yaml  0% smaller

@sourcery-ai

sourcery-ai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the Git framework preset by adding the experimental no-ai-marks hooks for commit messages and staged changes, while also applying the requested autoupdate revisions to three existing hooks.

Flow diagram for no-ai-marks Git checks

flowchart LR
    CommitMsg["Commit message"] --> CommitHook["no-ai-marks-commit-msg"]
    StagedChanges["Staged changes"] --> StagedHook["no-ai-marks-staged"]
    CommitHook --> Decision{Allowed content?}
    StagedHook --> Decision
    Decision -->|yes| Proceed["Allow commit"]
    Decision -->|no| Reject["Reject commit"]
Loading

File-Level Changes

Change Details Files
Adds experimental no-ai-marks commit-message and staged-content checks to the Git framework preset.
  • Pins no-ai-marks at v0.1.1.
  • Configures commit-message and staged-change hooks with descriptions and appropriate stages.
  • Enables rejection of AI-attribution markers and hidden Unicode characters through the new hooks.
framework/git/preset.yaml
Updates existing preset hook revisions through autoupdate.
  • Bumps commit-check from v2.15.0 to v2.17.0.
  • Bumps commitizen from v4.17.0 to v4.18.0.
  • Bumps zizmor-pre-commit from v1.29.0 to v1.30.1.
framework/git/preset.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can switch off images and animations for a plain-text comment

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Add no-ai-marks hooks to the Git framework preset

✨ Enhancement ⚙️ Configuration changes 🕐 Less than 10 minutes

Grey Divider

AI Description

• Adds experimental no-ai-marks checks for commit messages and staged changes.
• Rejects AI attribution markers and hidden Unicode in Git contributions.
• Refreshes commit-check, commitizen, and zizmor hook revisions.
Diagram

graph TD
  A["Git preset"] -->|adds| B["no-ai-marks"] -->|provides| C["Commit hook"] -->|checks| D["Commit message"]
  B -->|provides| E["Staged hook"] -->|checks| F["Staged changes"]
Loading
High-Level Assessment

Using the upstream no-ai-marks hooks in the existing declarative preset is the appropriate approach. Reimplementing these checks locally would duplicate maintained functionality, while marking the new hooks experimental appropriately communicates their maturity.

Files changed (1) +13 / -3

Other (1) +13 / -3
preset.yamlAdd no-ai-marks hooks and refresh Git preset revisions +13/-3

Add no-ai-marks hooks and refresh Git preset revisions

• Adds experimental hooks that reject AI attribution and hidden Unicode in commit messages and staged changes. Also upgrades commit-check to v2.17.0, commitizen to v4.18.0, and zizmor-pre-commit to v1.30.1.

framework/git/preset.yaml

@sourcery-ai sourcery-ai 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.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@codescene-access codescene-access 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.

No application code in the PR — skipped Code Health checks.

See analysis details in CodeScene

Quality Gate Profile: Customizable Safeguards
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@llamapreview llamapreview 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.

LlamaPReview — No blocking issues found

A data-only commit adds the opt-in mishan/no-ai-marks preset entry (both hooks category: experimental, both described) to framework/git/preset.yaml, so default users' generated configs only pick up the standard revision bumps from this repo's autoupdate.

Review details and evidence

Material unknowns

  • Upstream existence of mishan/no-ai-marks@v0.1.1 and of the two hook ids no-ai-marks-commit-msg and no-ai-marks-staged at that tag. If either were wrong, only users who pass --profile experimental would be affected, and their generated config would fail when pre-commit clones or instantiates the repo. Deep stated this does not decide the objective, so it stays nonblocking.
    • Check: Confirm the upstream .pre-commit-hooks.yaml at v0.1.1 declares the two hook ids used by this preset entry.
  • Whether any repository test pins the old preset revisions (v2.15.0, v4.17.0, v1.29.0) in generated-output assertions. Would change confidence in the bundled revision bumps, not the objective or the merge posture.
    • Check: Skim tests/integration/test_cli_generation.py and tests/unit/test_generator.py for hardcoded preset revisions.

LlamaPReview checks

  • Inspected matching PR-head repository snippets in CONTEXT.md, CONTRIBUTING.md, gpc_init/merger.py and 2 more path(s).
  • Inspected bounded directory inventory under tests/conftest.py, tests/fixtures, tests/fixtures/framework and 9 more path(s).
  • Read the complete PR-head file .github/workflows/validate-presets.yml.
  • Read bounded PR-head context from gpc_init/loader.py.
  • Inspected matching PR-head repository snippets in CONTEXT.md, README.md, CONTRIBUTING.md and 2 more path(s).
  • Read bounded PR-head context from tests/unit/test_catalog.py.

LlamaPReview is an open-source pull request reviewer. Tell the maintainers where this review got it wrong.

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