Skip to content

feat(docs): add AI commits badge - #1046

Merged
DevSecNinja merged 2 commits into
mainfrom
devsecninja-ai-commits-badge
Nov 15, 2026
Merged

DevSecNinja merged 2 commits into
mainfrom
devsecninja-ai-commits-badge

Conversation

@DevSecNinja

@DevSecNinja DevSecNinja commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add an AI commits badge beside the Docs badge and a commit attribution card to the README.
  • Generate badge assets from Git authors and co-author trailers, excluding merges and bot automation, and publish them through the existing Pages workflow on a daily schedule.
  • Use the shared DevSecNinja/.github/actions/ai-commits-badge action pinned to v3.7.0; the local copy of the generator is removed.
  • The badge URLs will resolve only after this PR is merged and GitHub Pages deploys.

Example

Snapshot of the shared action's generated badge and README card from local validation (November 15, 2026). The published SVGs will reflect the latest history after deployment; the card adapts to light/dark mode.

Dotfiles AI commits badge and Who wrote the commits card showing 43% AI-involved commits

Local validation

  • Generated and validated the SVG and JSON assets against full repository history; checked classification using a synthetic Git history.
  • Passed mkdocs build --strict, actionlint, targeted workflow and repository validation tests, a Chezmoi dry-run, and Lefthook pre-commit checks.
  • The v3.7.0 action script generated the expected four assets on this branch: 349 of 808 commits (43.2%) attributed to AI, with the remaining 459 labeled unattributed.
  • Fish tests were skipped because Fish is not installed. The full Bash suite timed out after 97 of 921 tests at the five-minute cap; the test at the cutoff passed in isolation.
  • mise was unavailable during the original validation; missing validation tools and MkDocs dependencies were supplied locally for the checks.

Summary by CodeRabbit

  • Documentation
    • Added an AI commits badge and an “AI usage” section to the README.
  • Chores
    • Documentation builds now run daily, and the AI commits badge is updated after each build.
    • Artifact uploads, deployment, and Grafana IRM notifications now run for non-pull-request events on main.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The docs workflow now runs daily, generates an AI commits badge, and uses updated conditions for artifact upload, deployment, and Grafana IRM notification. The README adds the badge and describes which commits its statistics include and exclude.

Changes: AI commits badge

Layer / File(s) Summary
Schedule and generate the badge
.github/workflows/docs.yml
The workflow runs daily at 05:23 UTC and runs the pinned badge action to write output to site/badges.
Publish docs and send notifications
.github/workflows/docs.yml
Artifact upload, deployment, and Grafana IRM notification now exclude pull requests and check for the main branch. The notification retains its always() check.
Document the badge and its counting scope
README.md
The README adds an AI commits badge and describes which commits the statistics include and exclude.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: copilot

Merge Risk: Minimal · up to 186ad

This adds an AI commits badge and a README section, and the Docs workflow now also runs daily. I found no concrete merge-blocking risk. The badge URLs resolve only after the first Pages deployment.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "feat(docs): add AI commits badge" matches the main change. The PR adds an AI commits badge beside the Docs badge in the README, generates the badge assets through the Docs workflow, and add…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "feat(docs): add AI commits badge" matches the main change. The PR adds an AI commits badge beside the Docs badge in the README, generates the badge assets through the Docs workflow, and adds an AI usage section that links to a commit attribution card. The title is short, specific, and names the primary change.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 92e5f821-ddd2-44ae-ba0f-3d5854d12c04
Commits

Reviewing files that changed from the base of the PR and between 062f1e1 and 186adc9.

Files selected for processing: 1

  • .github/workflows/docs.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues block approval of the AI commit attribution changes.

No open issues 🎉

What changed in this PR

Adds AI commit attribution to the dotfiles README, with generated statistics and images hosted through the existing documentation site.

Changes:

  • Adds a compact AI commits badge and an attribution card to the README.
  • Generates SVG and JSON assets from commit authors and co-author trailers, excluding merges and recognized bot automation.
  • Extends the Pages workflow to generate the assets and refresh them daily. Asset URLs become available after merge and deployment.
File Description
README.md Displays the badge and attribution card, and explains measurement limits.
.github/​workflows/​docs.yml Generates badge assets during documentation builds and enables daily publication.
.github/​scripts/​ai-commits-badge.py Classifies commit attribution and renders badges, cards, and JSON statistics.

Review effort: Balanced

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@DevSecNinja
DevSecNinja merged commit c8d492a into main Nov 15, 2026
16 checks passed
@DevSecNinja
DevSecNinja deleted the devsecninja-ai-commits-badge branch November 15, 2026 14:05
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.

2 participants