When the hook is triggered, the build will run (without notifying).
Open a GitHub pull request when a hook is triggered.
Open an Azure pull request when a hook is triggered.
Open a GitLab pull request when a hook is triggered.
Every time the exporter runs (either successfully or with a potential error), your API will be invoked and sent the following JSON payload through POST:
{ "event": "job:updated", "workspace": { "id": "1", "name": "Example workspace" }, "designSystem": { "id": "2", "name": "Example Design System" }, "designSystemVersion": { "id": "3", "name": "A version name", "version": "v0.1" }, "exporter": { "id": "4", "name": "Example exporter" }, "hook": { "id": "5", "name": "Example hook" }, "job": { "id": "6", "status": "Success", "logs": [ { "id": "", "time": "2021-03-25T16:13:28.804Z", "type": "info", "message": "Finished exporting source colors.pr" }, ], "urls": [ "https://example.supernova.io/codegen/job-results/2/example-01234567-89ab-cdef/result.zip" ] } }
There are several important pieces to this payload:
Hook Configuration
You will get a complete set of the configuration attributes inside the payload, allowing you to precisely identify which event happened, in which design system, and forward the code wherever you want to.
Job
Job describes the result of the run:
URLs
If the exporter created code successfully, urls will be provided as well. At this point, there will always be just one link, but we are reserving this option for more flexibility down the road.
The URL links to a secure, signed .zip file that can only be accessed with the URL provided in the payload, containing the structured output of the exporter.