getsentry / action-visual-snapshot

Save and compare your visual snapshots
MIT License
38 stars 7 forks source link

Contribution question/bug? #54

Closed blacha closed 1 year ago

blacha commented 2 years ago

This is a super cool github action thanks for sharing!

I am looking at using this as to validate that our configuration was deployed correctly. https://github.com/linz/basemaps-config, I have configured this action and managed to get it checking diffs! example output: https://storage.googleapis.com/linz-basemaps-testing-bc/linz/basemaps-config/053d3cbaa9492cebf3cd1589b891bc868700e685/index.html

I have a couple questions

  1. Contributions, I have found a small bug and could pull request a change back to here but the contributions are "WIP" does that mean you don't want pull requests? https://github.com/getsentry/action-visual-snapshot#contributing

  2. I am a little confused as to how you "resolve" a "action_required" output, in the source code there is a reference to 'https://sentry-visual-snapshot-dwunkkvj6a-uc.a.run.app/api'; but I am not entirely sure what this app is for? I am currently just marking this check as not a "required" check on the pull requests so humans can merge even though the check is "action_required"

In relation to 1. if you do not have any childPaths the output path is never created, I added a await fs.mkdir(base, {recursive: true}} to between line 125 and 126 of https://github.com/getsentry/action-visual-snapshot/blob/main/src/util/diffSnapshots.ts#L126 and that resolved it for me.

Example failure: https://github.com/linz/basemaps-config/actions/runs/2329175303

asottile-sentry commented 1 year ago

archiving: closing issues