reg-viz / reg-cli

📷 Visual regression test tool.
https://reg-viz.github.io/reg-cli/
MIT License
352 stars 24 forks source link

Approve/decline snapshot #314

Open IlyaPuchkaTW opened 4 years ago

IlyaPuchkaTW commented 4 years ago

Is your feature request related to a problem? Please describe.

Some similar tools like Chromatic, Percy or Happo support approving/declining particular snapshot changes and integrate with GitHub status checks.

Describe the solution you'd like

Generated report should have button to approve/decline all or some snapshots that should post GitHub status check update. This web hook url can be something that developer should pass to the tool manually as a parameter and these buttons could simply call these urls to publish update. When all snapshots are approved status is updated with success. It would be nice also to be able to filter by approved/declined PRs but that would require some sort of persistence for the state of snapshot.

Describe alternatives you've considered

Right now users would have to request changes on PRs and give a feedback manually.

Quramy commented 4 years ago

See https://github.com/reg-viz/reg-suit/tree/master/packages/reg-notify-github-plugin#how-to-set-commit-status-succeed .

IlyaPuchkaTW commented 4 years ago

Thanks for the reference! I don't quite get how this part about "Approve Review Changes" is done and can't see it in any demos.

Quramy commented 4 years ago

If reg-suit detects visual difference (i.e. snapshot changes), reg-suit sets corresponding PR's status to failure.

スクリーンショット 2020-09-10 22 50 05.

And this status can be succeeded if your reviewers approve the PR. reg-suit's GitHub integration uses webhook and subscribe PR status change event.

IlyaPuchkaTW commented 4 years ago

I see now, thanks!