Example of a web app to create a GitHub App from a manifest, which can save you a lot of time when you need to create a lot of Apps with the same settings (for example webhook triggers for Jenkins)
This repo holds both a plain HTML setup (see the html
folder) and a simple NodeJS setup that uses the same static files, but with a simple node app.js
you can start it (make sure you are in the nodejs folder).
These are the files at play here:
- index.html: setup of the manifest and posting that data to the organization api in this case:
https://github.com/organizations/rajbos-actions-demo/settings/apps/new
- redirect.html: receives the redirect after the app has been created and loads the AppId and PEM data for us.
- manifest1.json: the manifest that we will post to the organization api, with an override of redirectUrl based on the current url.
- script.js: a separate file hosting the JavaScript that does the work