Skip to content

ci: comment README screenshot differences on pull requests - #122

Merged
vitormattos merged 2 commits into
mainfrom
feat/screenshot-diff-pr-comment
Sep 21, 2026
Merged

vitormattos merged 2 commits into
mainfrom
feat/screenshot-diff-pr-comment

Conversation

@vitormattos

Copy link
Copy Markdown
Member

This improves the failure feedback from the README screenshot check.

When the screenshot comparison fails, the artifact now contains the committed (expected) screenshot, the generated screenshot, and the visual diff when dimensions match.

A separate workflow_run workflow downloads only that artifact and posts the images directly on the pull request. This keeps the original PR workflow unprivileged, including Dependabot and fork PRs. The privileged follow-up workflow does not check out or execute pull request code.

The comment shows:

  • expected screenshot;
  • generated screenshot;
  • visual diff when available;
  • the command to regenerate the committed screenshot when the change is expected.

This follows the failure observed in #119, where the artifact existed but reviewers had to open and download it manually.

@vitormattos
vitormattos requested a review from a team as a code owner September 21, 2026 22:47
@vitormattos
vitormattos merged commit 9e61b0f into main Sep 21, 2026
5 of 6 checks passed
@vitormattos
vitormattos deleted the feat/screenshot-diff-pr-comment branch September 21, 2026 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant