{"id":50732487,"url":"https://github.com/bertpl/gitsvg-action","last_synced_at":"2026-06-10T10:01:59.009Z","repository":{"id":362144598,"uuid":"1257594342","full_name":"bertpl/gitsvg-action","owner":"bertpl","description":"GitHub Action to render, validate, and drift-check git graph diagrams (gitsvg) as SVG in CI","archived":false,"fork":false,"pushed_at":"2026-06-02T20:54:06.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-02T22:24:27.232Z","etag":null,"topics":["ci","diagram-as-code","git-diagram","git-graph","github-action","gitsvg","svg"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bertpl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-02T20:37:04.000Z","updated_at":"2026-06-02T21:02:03.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bertpl/gitsvg-action","commit_stats":null,"previous_names":["bertpl/gitsvg-action"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/bertpl/gitsvg-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertpl%2Fgitsvg-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertpl%2Fgitsvg-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertpl%2Fgitsvg-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertpl%2Fgitsvg-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bertpl","download_url":"https://codeload.github.com/bertpl/gitsvg-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertpl%2Fgitsvg-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34146870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci","diagram-as-code","git-diagram","git-graph","github-action","gitsvg","svg"],"created_at":"2026-06-10T10:01:56.014Z","updated_at":"2026-06-10T10:01:58.991Z","avatar_url":"https://github.com/bertpl.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# gitsvg-action\n\nRender, validate, or drift-check [`gitsvg`](https://github.com/bertpl/gitsvg) diagrams as SVG in your GitHub Actions workflows.\n\n[`gitsvg`](https://pypi.org/project/gitsvg/) turns a declarative `.gitsvg.jsonl` file — a list of git operations like `branch`, `commit`, `merge`, and `pull_request` — into a polished SVG of a git history. This action lets you keep those diagrams as **source under version control** and act on them in CI: render them to SVG, validate them on every pull request, or fail the build when a committed SVG drifts out of sync with its source.\n\n![Example diagram](https://raw.githubusercontent.com/bertpl/gitsvg-action/main/examples/linear.svg)\n\nThat's one diagram in the default style. `gitsvg` also ships a set of built-in themes — here's the same git history rendered across several of them, alongside its desktop-GUI table layout, so you can see at a glance the range of looks gitsvg can produce:\n\n![gitsvg's built-in themes](https://raw.githubusercontent.com/bertpl/gitsvg-action/main/assets/named-themes.svg)\n\n## Usage\n\nRender every `.gitsvg.jsonl` under a directory, in place:\n\n```yaml\nsteps:\n  - uses: actions/checkout@v6\n  - uses: bertpl/gitsvg-action@v1\n    with:\n      input: docs/diagrams\n```\n\nNo `fetch-depth: 0` is needed — `gitsvg` reads your `.gitsvg.jsonl` files, not your repository's git history.\n\n### Validate diagrams on every pull request\n\n```yaml\n  - uses: bertpl/gitsvg-action@v1\n    with:\n      command: validate\n      input: docs/diagrams\n```\n\n### Guard committed SVGs against drift\n\nFail the build when a committed `.svg` no longer matches what its source renders to:\n\n```yaml\n  - uses: bertpl/gitsvg-action@v1\n    with:\n      command: check\n      input: docs/diagrams\n      gitsvg-version: \"0.2.6\"   # pin for check, so an upstream gitsvg release can't cause a spurious drift failure\n```\n\n### Render a single file, minified\n\n```yaml\n  - uses: bertpl/gitsvg-action@v1\n    with:\n      input: docs/graph.gitsvg.jsonl\n      output: docs/graph.svg\n      small: \"2\"\n```\n\n## Commands\n\n- **`render`** (default) — render a single file to SVG, or recursively render a directory tree of `*.gitsvg.jsonl` files to mirrored `.svg` outputs.\n- **`validate`** — run `gitsvg`'s validation pipeline and fail on any malformed diagram. A cheap pull-request gate.\n- **`check`** — re-render and fail if a committed `.svg` is stale relative to its source, so diagram source and rendered output can't silently drift apart. Pin `gitsvg-version` when using `check`, so an upstream gitsvg change can't surface as a spurious drift failure.\n\n## Inputs\n\n| Input | Default | Description |\n|-------|---------|-------------|\n| `command` | `render` | `render`, `validate`, or `check`. |\n| `input` | _(required)_ | Path to a `.gitsvg.jsonl` file, or a directory containing them. |\n| `output` | _(derived)_ | Where to write SVG output for `render` / `check`. A file path for a single-file input, a directory for a directory input. Defaults to the input's sibling `.svg` (file) or in place (directory). |\n| `small` | `0` | Minification level 0–3 (`render` / `check`); `0` is pristine. |\n| `gitsvg-version` | `latest` | The `gitsvg` version to install — a [PyPI version](https://pypi.org/project/gitsvg/#history) (e.g. `0.2.6`), or `latest`. Pin it for reproducible output. |\n| `python-version` | `3.13` | Python version for the runner (`gitsvg` requires 3.11+). |\n\n## Outputs\n\n| Output | Description |\n|--------|-------------|\n| `svg-path` | Path of the generated SVG (single-file `render`; empty for a directory input). |\n| `svg-count` | Number of diagrams rendered. |\n\n## How it works\n\nThis is a composite action: it sets up Python, installs `gitsvg` from PyPI, and runs its CLI. It needs no special `permissions:` — all three commands are read-only with respect to your repository. (`check` re-renders and compares against your committed SVGs; it never writes back.)\n\n## License\n\n[MIT](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertpl%2Fgitsvg-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbertpl%2Fgitsvg-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertpl%2Fgitsvg-action/lists"}