Skip to main content

Official Badges & CI/CD Integration

Zenzic provides two official badge types. Add them to your project's README.md to signal documentation integrity to contributors and users.


๐Ÿ›ก๏ธ Zenzic Shield (Binary Status)โ€‹

Zenzic Shield badge

Use this badge for strict pipelines where any broken link, dead anchor, or leaked credential must block the build. It is a binary gate: passing or failing.

Copy-paste Markdownโ€‹

Passing (green):

[![Zenzic Shield](https://img.shields.io/badge/๐Ÿ›ก๏ธ_zenzic_shield-passing-4f46e5?style=flat)](https://github.com/PythonWoods/zenzic)

Failing (red):

[![Zenzic Shield](https://img.shields.io/badge/๐Ÿ›ก๏ธ_zenzic_shield-failing-ef4444?style=flat)](https://github.com/PythonWoods/zenzic)
- name: Lint documentation (Zenzic Shield)
run: uvx zenzic check all --strict

Place the passing URL in your README. If this step fails in CI, manually swap the badge to failing โ€” or automate it via dynamic-badges-action (see CI/CD Integration).


๐Ÿ’ฏ Zenzic Score (Improvement Metric)โ€‹

Zenzic Score badge

Use this badge to expose the live quality score (0โ€“100) of your documentation. Ideal for legacy projects adopting Zenzic progressively: a green build can still show a non-perfect score, encouraging continuous improvement without blocking the workflow.

Copy-paste Markdownโ€‹

[![Zenzic Score](https://img.shields.io/badge/๐Ÿ›ก๏ธ_zenzic-100%2F100-4f46e5?style=flat)](https://github.com/PythonWoods/zenzic)

Using --fail-under for progressive adoptionโ€‹

# Green CI at 72/100 โ€” build passes, score is visible
zenzic score --fail-under=70

# Red CI at 72/100 โ€” floor not met
zenzic score --fail-under=80

The --fail-under flag decouples the exit code from the score value. Teams can start at a realistic floor (e.g. 60) and raise it sprint by sprint.


๐Ÿ“Š Live Score Badge via JSONโ€‹

zenzic score --save writes .zenzic-score.json at the repo root:

{"project": "zenzic", "score": 100, "threshold": 0, "status": "success", "timestamp": "...", "categories": [...]}

This file is the machine-readable bridge to dynamic Shields.io badges.

Automate with GitHub Actionsโ€‹

The following two steps save the score and push it to a GitHub Gist that Shields.io reads on every request:

- name: Compute Zenzic Score
run: |
uvx zenzic score --save
echo "SCORE=$(uvx zenzic score --format json | python3 -c \
'import sys,json; print(json.load(sys.stdin)["score"])')" >> "$GITHUB_ENV"

- name: Update Score Badge
uses: Schneegans/dynamic-badges-[email protected]
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: <your-gist-id>
filename: zenzic-score.json
label: "๐Ÿ›ก๏ธ zenzic"
message: "${{ env.SCORE }} / 100"
color: ${{ env.SCORE == '100' && '4f46e5' || env.SCORE >= '80' && 'f59e0b' || 'ef4444' }}

Then reference the dynamic endpoint in your README:

[![Zenzic Score](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/<user>/<gist-id>/raw/zenzic-score.json)](https://github.com/PythonWoods/zenzic)

Setup: create a Gist, generate a Personal Access Token with gist scope, save it as GIST_SECRET in your repo secrets, and replace <your-gist-id>. See CI/CD Integration for the complete workflow.


๐ŸŽจ Offline / Enterprise Badgesโ€‹

Projects in air-gapped or enterprise environments that cannot call img.shields.io can embed the official static SVG assets from the Brand Kit directly:

FileDescription
zenzic-badge-shield.svgStatic "passing" shield badge
zenzic-badge-score.svgStatic "100 / 100" score badge

Note: brand-kit.zip is a build artifact. It is not stored in the repository โ€” download it from the GitHub Releases page, or generate it locally with nox -s preflight.