Repository navigation
feat: surface shareable report badge after Pages deploy - #9
Merged
Merged
Conversation
gitstats now writes a badge.svg (live commit count, brand colors) into every report, deployed alongside index.html. Make it easy to adopt: - new outputs: badge_url and badge_markdown - the deploy step writes ready-to-copy badge markdown (with a live preview) to the job summary, so users can paste [](<pages>/) straight into their README - document the badge in the README (new section, outputs table, what's-included list) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EXwAqUQfggpAAtSeHPQQxy
…point gitstats now pre-renders badges/<metric>.svg (commits, last-commit, authors, files, lines) and badges/<metric>.json (shields endpoint schema) alongside badge.svg. Surface that: - job summary mentions the metric variants and config-based styling - README documents metric URLs, the config input keys (badge_metric/badge_label/badge_color/badge_style), and the img.shields.io/endpoint route for full URL-parameter customization Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EXwAqUQfggpAAtSeHPQQxy
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EXwAqUQfggpAAtSeHPQQxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gitstats now writes a badge set into every report, deployed alongside
index.html(see companion PR shenxianpeng/gitstats#272): a defaultbadge.svgplusbadges/<metric>.svgfor every metric (commits,last-commit,authors,files,lines) andbadges/<metric>.jsonin the shields.io endpoint schema. This PR makes the badges easy to adopt from the action:New outputs:
badge_urlandbadge_markdownThe deploy step writes ready-to-copy badge markdown (with a live preview) to the job summary, so after one workflow run users can paste this straight into their README:
The summary also points at the metric variants (
badges/<metric>.svg) and config-based stylingREADME: new "Add a badge to your README" section with customization docs (metric URLs,
badge_metric/badge_label/badge_color/badge_stylevia theconfiginput, and theimg.shields.io/endpointroute for full URL-parameter customization), outputs table rows, and a "What's Included" bulletNotes
action.ymlYAML and the shell snippets were validated locally.🤖 Generated with Claude Code
https://claude.ai/code/session_01EXwAqUQfggpAAtSeHPQQxy