-
Go to your organization -> Developer Settings -> GitHub App
-
Register a new app, name it something like
test-app, a homepage likehttps://example.com/homepageand a webhook URL likehttps://example.com/webhook -
Give it some permissions to start, any, you can change them later (see below), then hit create
-
Scroll down to generate a private key, we will use that later
-
On the left click
install appand hammer that install button -
Now we will set it up to work with The Power
-
Go to your cloned repo where you've set up the power
-
vi .gh-api-examples.confand change the following things:- Make sure the org is the correct one under
### [Organization](https://docs.github.com/en/rest/orgs) - Under
### [GitHub Apps](https://docs.github.com/en/rest/apps)change the following:- Point
private_pem_fileto the location of the file downloaded in step 4 default_app_idis the App ID underhttps://github.com/organizations/<YOURORG>/settings/apps/<SNAPPYAPPNAME>client_idis the Client ID at the above addressdefault_installation_idis the installation ID of the app, found underhttps://github.com/organizations/<YOURORG>/settings/installations/<installationID>, you can get there by clicking install app and then the little gear next to your app
- Point
- Make sure the org is the correct one under
-
Now run
./tiny-dump-app-token.shand it should look something like this:
++++++++++++++++++++++ App Token ++++++++++++++++++++++
ghs_w0wTh1sReAlLyIsAToKeN0rSomETH1nGLoOKSgrEAt (<- not a real token)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
- Put that in your GraphiQL header or set your GITHUB_TOKEN to use the REST API
When updating app permissions, remember to approve them! To do that go to this page https://github.com/organizations/<YOURORG>/settings/installations/<installationID> and review request -> Accept new permissions
Otherwise the permission change will be for naught as they will not stick. The UI can be a little quirky.