takahirom / roborazzi-compare-on-github-comment-sample

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Roborazzi compare snapshot comment on GitHub pull request sample

This is a sample repository to demonstrate how to use Roborazzi to compare snapshots on GitHub pull requests.

Example of the comment

#1 (comment)

How to use

Please refer to the .github/workflows directory for the workflow definitions.

StoreScreenshot.yml is the workflow to store the screenshot of the pull request.

CompareScreenshot.yml is the workflow to compare the screenshot of the pull request with the one of the base branch.

CompareScreenshotComment.yml is the workflow to comment the result of the comparison on the pull request.

About the companion branch approach

The companion branch approach is a way to store the screenshot of the feature branches. When a pull request is created, the screenshot of the feature branch is stored in the companion branch. When the branch is outdated, the branch is deleted. This approach allows users to see changes of the screenshot of the feature branch on pull requests. Outdated branches are deleted to reduce the Git repository size and ensure that only relevant screenshots are retained.

Why not use GitHub Actions artifacts?

GitHub Actions artifacts is a good way to store the screenshot. However, it is not easy to see the changes of the screenshot on pull requests because the artifacts are stored as a zip file. It seems LFS has the same problem.

Why not commit the screenshot to the feature branch?

It is also a good way to store the screenshot. However, the stored screenshot is not deleted and remains in the repository because Git keeps the history of the commits.

About

License:Apache License 2.0


Languages

Language:Kotlin 100.0%