plotly/nitpix
Visual diff for CI: compares snapshot PNGs against baselines stored on an orphan git branch, posts a PR review comment with before/after/diff images, and manages a commit status that flips green on "/nitpix approve".
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| snapshots-dir | Directory containing the snapshot PNGs captured by the test run | no | nitpix-snapshots |
| artifact-pattern | Glob of artifacts to download and merge into snapshots-dir (for sharded test matrices that uploaded via nitpix/upload). Set to '' if the snapshots were captured in this same job. | no | nitpix-snapshots-* |
| mode | 'diff' (compare against baselines, report on the PR), 'promote' (make this run's snapshots the new baselines for the current branch), or 'auto' (diff on pull_request events, promote otherwise). | no | auto |
| base | Branch whose baselines to compare against (diff mode) or update (promote mode). Defaults to the PR base branch / the pushed branch. | no | "" |
| baseline-branch | Orphan branch storing baselines, pending images and approvals | no | nitpix |
| threshold | odiff per-pixel color difference threshold (0-1, lower is stricter) | no | 0.1 |
| antialiasing | Ignore anti-aliased pixels when diffing | no | true |
| fail-on-new | Require approval for brand-new snapshots (no baseline yet) | no | false |
| fail-on-missing | Require approval when a baseline snapshot was not captured this run | no | false |
| fail-on-change | Also fail this step when unapproved changes exist. Off by default: the commit status (status-context) carries the pass/fail signal so that approving does not require re-running the test matrix. | no | false |
| comment | Post/update the PR review comment | no | true |
| max-comment-images | Maximum number of inline images embedded in the PR comment (a changed snapshot costs 3, a new one costs 1; worst diffs first). Snapshots beyond the budget degrade to baseline/new/diff links. | no | 30 |
| thumbnail-width | Width of the thumbnails embedded in the PR comment (they link to the full-size images). Set to '0' to embed full-size images instead. | no | 360 |
| status-context | Commit status context name (make this a required check) | no | nitpix/visual |
| command-prefix | Slash-command prefix used in the PR comment instructions | no | /nitpix |
| github-token | Token with contents:write, pull-requests:write and statuses:write | no | ${{ github.token }} |
| odiff-version | odiff-bin version to install | no | 4.3.8 |
Outputs
| name | description |
|---|---|
| status | 'passed' | 'needs-approval' (diff mode) or 'promoted' | 'skipped' (promote mode) |
| changed-count | Number of changed snapshots |
| added-count | Number of new snapshots |
| missing-count | Number of baselines with no snapshot this run |
| unapproved-count | Number of snapshots still needing approval |