microlinkhq/microlink-difftool
Visual diff between two URLs using Microlink full-page screenshots, posted as a sticky PR comment.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jun 11, 2026
- License
- MIT
Pinned Snippet
uses: microlinkhq/difftool@9c0d3bde487752884248dbcd80d1f401e6c20d2a # no releases — HEAD as of 2026-07-11tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| base | Production / baseline URL | yes | — |
| head | Preview URL to compare against base. Use the literal value `vercel` to auto-discover from Vercel deployments on this PR's head SHA. | yes | — |
| s3-config | JSON object with S3-compatible storage credentials. Required keys: accessKeyId, secretAccessKey, bucket. Optional: endpoint (provider URL), region, forcePathStyle, presignedTtlSeconds. Pass via a secret. | yes | — |
| pr-number | Pull request number to comment on. Defaults to the current pull_request event's number. | no | — |
| sha | Commit SHA used for the per-PR object key prefix. Defaults to the current pull_request event's head SHA. | no | — |
| routes | Array of paths to diff. Supported formats: - JSON array string: "[\"/\",\"/kikobeats\"]" - YAML list string (with `|`): "- '/'\n- '/kikobeats'" | — | ["/"] |
| threshold | Max acceptable diff ratio (0..1) below which routes pass with no changes flagged | — | 0.001 |
| warning-threshold | Max diff ratio (0..1) for a warning verdict. Changes between threshold and this value are warnings; above this value routes fail. | — | 0.05 |
| pixel-threshold | Per-pixel sensitivity (0..1) | — | 0.1 |
| mql | JSON object with Microlink API options passed to the screenshot call. Common keys: viewport ({ width, height }), styles (array of CSS strings), headers (object). When head=vercel, the x-vercel-skip-toolbar header is automatically set. | no | — |
| microlink-api-key | Optional Microlink paid-tier key (recommended for CI) | no | — |
| presigned-ttl-seconds | TTL in seconds for pre-signed URLs in the comment. Overrides s3-config.presignedTtlSeconds. Defaults to 86400 (24h). | no | — |
| comment-marker | HTML comment marker so re-runs edit the same PR comment | — | <!-- microlink-difftool --> |
| provider-timeout | When head=vercel, max seconds to wait for the deployment to be ready. | — | 600 |
| provider-interval | When head=vercel, seconds between deployment-status polls. | — | 10 |
| token | Token for posting the PR comment. Alias for github-token. | no | — |
| github-token | Token for posting the PR comment. | — | ${{ github.token }} |
Outputs
| name | description |
|---|---|
| passed | "true" if no routes exceed the warning threshold (warnings are not failures), else "false" |
| verdict | "pass", "warning", or "fail" — overall verdict across all routes |
| summary-json | Path to summary.json on the runner |