This is a sample repository to demonstrate how to use Roborazzi to compare snapshots on GitHub pull requests.
Example of the comment
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.
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.
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.
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.