Badges

Status badges for master to embed in a README or anywhere else that takes an image. Every option below is part of the page's address, so you can link to any view of it.

This repository now

Every badge this repository has, drawn in your current theme. GitGud pages show badges this way, so they change with the reader's theme.

No coverage yet. See reporting to badges below.

Every theme

Fixed to one theme, for embedding where you know the background. Each card sits on its theme's own background. Select a badge to open its image.

Contrast, dot style

Badge text is 11px, so it needs 4.5:1. The status dot is a shape and needs 3:1. Where a theme's usual text color falls short, badges use another, named under the ratio.

Theme text success dot warning dot error dot info dot GG
light Aa 12.74 base-content ● 12.74 base-content ● 12.74 base-content ● 3.60 error ● 12.74 base-content Aa 16.45 accent
dark Aa 16.80 base-content ● 4.93 success ● 5.52 warning ● 3.93 error ● 6.27 primary Aa 5.02 accent
her Aa 14.47 base-content ● 12.66 success ● 14.38 warning ● 8.76 error ● 9.97 info Aa 14.72 accent
afterdark Aa 17.38 base-content ● 14.49 success ● 16.46 warning ● 10.03 error ● 11.41 info Aa 16.86 accent
forest Aa 17.56 base-content ● 14.41 success ● 16.37 warning ● 9.97 error ● 11.35 info Aa 16.76 accent
sky Aa 17.08 base-content ● 14.06 success ● 15.97 warning ● 9.73 error ● 11.07 info Aa 16.35 accent
clays Aa 16.87 base-content ● 14.60 success ● 16.59 warning ● 10.10 error ● 11.50 info Aa 16.99 accent
stones Aa 16.86 base-content ● 14.69 success ● 16.69 warning ● 10.17 error ● 11.57 info Aa 17.09 accent
blueprint Aa 13.92 base-content ● 13.84 success ● 15.73 warning ● 9.58 error ● 10.90 info Aa 16.10 accent

Embed

Uses the style, corners, scale and GG setting above. auto follows the reader's light or dark setting on any site that shows SVG. A PNG can't, so the HTML snippet offers a dark and a light image instead.

Preview of the selected badge
Markdown
[![CI status](https://gg.neiam.co/r/neiam/feedpug/badge/ci/dot/square/2x/gg.svg)](https://gg.neiam.co/r/neiam/feedpug/actions)
HTML, separate dark and light images
<a href="https://gg.neiam.co/r/neiam/feedpug/actions">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://gg.neiam.co/r/neiam/feedpug/badge/ci/dot/square/2x/gg/dark.svg">
    <img alt="CI status" src="https://gg.neiam.co/r/neiam/feedpug/badge/ci/dot/square/2x/gg/light.svg">
  </picture>
</a>
reStructuredText
.. image:: https://gg.neiam.co/r/neiam/feedpug/badge/ci/dot/square/2x/gg.svg
   :target: https://gg.neiam.co/r/neiam/feedpug/actions
   :alt: CI status
AsciiDoc
image:https://gg.neiam.co/r/neiam/feedpug/badge/ci/dot/square/2x/gg.svg[CI status,link=https://gg.neiam.co/r/neiam/feedpug/actions]
Image URL
https://gg.neiam.co/r/neiam/feedpug/badge/ci/dot/square/2x/gg.svg

Reporting to badges

Two job outputs feed the badges. gitgud-coverage takes a percentage: when the job succeeds, the commit gets a coverage status and the coverage badge shows the newest one on master. gitgud-summary says in a few words what a job found, like 1 no fix from an audit: the workflow's badge shows it in place of warning or failing, and so does the job's check on the commit.

jobs:
  test:
    runs-on: docker
    outputs:
      gitgud-coverage: ${{ steps.coverage.outputs.percent }}
    steps:
      - uses: actions/checkout@v4
      - run: mix test --cover
      - id: coverage
        run: echo "percent=87.3" >> "$GITHUB_OUTPUT"
  audit:
    runs-on: docker
    outputs:
      gitgud-conclusion: ${{ steps.scan.outputs.conclusion }}
      gitgud-summary: ${{ steps.scan.outputs.summary }}
    steps:
      - uses: actions/checkout@v4
      - id: scan
        run: |
          echo "conclusion=warning" >> "$GITHUB_OUTPUT"
          echo "summary=1 no fix" >> "$GITHUB_OUTPUT"