This is an example database showcasing the Metadelta tool.
In particular, we have:
- A sample Hasura database,
- A few commits making some changes,
- Some scripts showcasing how to run a local diff,
- A GitHub Actions integration showing how to integrate this into a "real" project.
If you take a look at the GitHub action workflow you will see a small collection of steps showing how to run the Metadelta on a PR.
The steps are as follows:
- Clone the PR branch and the main branch to temp directories,
- Run
metadelta
(from Docker) outputting adiff.json
file, - If there was a difference:
- Upload it as an artifact to GitHub,
- Comment with a link to the Metadelta UI to view the artifact.
The only requirement for this to work is to configure a GitHub access token in the settings of the UI. The reason for this is GitHub requires a personal token for downloading artifacts.
You are, of course, free to upload your artifacts to another
(publically-accessible) location, and then just use the src
parameter on
the UI to grab the diff that way.