Skip to content

feat(badge): dynamic docvet badge showing pass/fail results #256

@Alberto-Codes

Description

@Alberto-Codes

Summary

The current docvet badge is static — it always says docs vetted | docvet in purple regardless of actual results. A dynamic badge would show real status, similar to how Codecov shows a coverage percentage.

Desired behavior

  • Passing: docvet | passing (green)
  • Findings: docvet | 3 findings (yellow/red)

Implementation options

  1. GitHub Action writes badge JSON — the docvet GitHub Action writes a shields.io endpoint JSON file (e.g., to GitHub Pages or a gist), then consumers use shields.io/endpoint?url=... to render it dynamically
  2. Badge service — a lightweight service that reads docvet results and returns shields.io-compatible JSON
  3. GitHub Action output — the Action outputs badge markdown that users can capture in their workflows

Option 1 is the simplest and most maintainable — no external service needed, just a JSON file alongside the docs site.

Prior art

  • Codecov dynamic badges via endpoint URL
  • Ruff's official badge via raw.githubusercontent.com endpoint
  • shields.io endpoint badge documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions