Syncing a Stoplight project with Git


(Robert) #1

The swagger.json I use in https://striim.docs.stoplight.io lives in Git. Is there any more elegant way to synchronize the two other than copying the contents of the code tab to a swagger.json file and creating a pull request?

For what it’s worth we use Bitbucket.


(Thomas De Groof) #2

As Stoplight projects are GIT repo’s as well (see https://docs.stoplight.io/platform/projects/git-repo ), you could clone the repository from Stoplight, then add Github as a second remote.

Of course, it’s your own responsibility to keep both remotes in sync.
But you could create a small bash script that pushes 2 both remotes at once every time you push, e.g. see https://gist.github.com/rvl/c3f156e117e22a25f242.