Automatically update project from GitHub

Currently, you have to import from GitHub manually whenever you make a change. It would be great to have a webhook URL that automatically pulls the latest version in from GitHub. It would also be cool to have an option to wait until the CI builds turn green.

2 Likes

An API for such things would be amazing.

1 Like

There’s no published API for that ATM, but if you want to do a little extra work, you can make it happen. I can’t promise that we won’t make breaking changes in the future.

Open up the Chrome console, and go to the network tab. Then do a manual GitHub import. You should see (at least) two requests appear. The first will be an OPTIONS request, and the second will be a POST to https://api.glitch.com/project/githubImport. The second is the one you need to repeat. You should be able to POST to that URL with the same JSON body to do the import again. Make sure you copy the Authorization header from the original request too.

3 Likes

It would be super cool to publish the Glitch API so people could write their own apps based on it :grinning:

1 Like