Initialize a Connection With a PAT and/or a Webhook
Follow this guide in order to initialize an AutoKitteh GitHub connection using a Personal Access Token (PAT) and/or a manually-configured webhook, instead of a server-wide OAuth-based GitHub app.
This guide assumes that the AutoKitteh server is already configured with HTTP tunneling.
Only organization and repository owners can create webhooks for them.
Personal Access Token (PAT)
Follow the instructions in this section if you intend to send outgoing API calls using your connection.
-
In a browser, go to: https://github.com/settings/apps
-
In the left sidebar, under "Personal access tokens", select either "Fine-grained tokens" or "Tokens (classic)", and click the "Generate new token" button
-
Follow the instructions for creating a fine-grained token or a classic token:
- GitHub recommends using fine-grained tokens instead of classic ones whenever possible
- For fine-grained tokens, make sure you select the right
resource owner: either yourself (for your personal repositories), or
an organization you're a member of (which allows PATs)
- GitHub organization owners can set a policy to restrict the access of PATs to their organization - see this page
- Repository access: either "All repositories", or "Only select repositories"
- Repository permissions: see the repository permissions section below
- Click the "Generate token" green button at the bottom of the page
-
Copy the new PAT string, and paste it in the appropriate field in AutoKitteh's GitHub connection UI
Don't click the "Save Connection" button in AutoKitteh yet! Continue to the webhook section below.
Webhook
Follow the instructions in this section if you intend to receive incoming events using your connection.
-
Copy the webhook URL from AutoKitteh's GitHub connection UI
-
Decide where you want the new webhook: a single repository, or an entire organization
-
Go to the settings page of that repository / organization
- Click "Webhooks" in the left sidebar
- Click the "Add webhook" button in the top-right corner of the page
-
Paste AutoKitteh's webhook URL from step 1 in GitHub's new webhook web page
-
Follow the instructions for repo webhooks, or for org webhooks:
- Content type: doesn't matter, AutoKitteh supports both
- Secret: specify the same string in GitHub and in AutoKitteh
- Events: select "Send me everything", or specific ones from the events section below
- Click the "Add webhook" green button at the bottom
-
Finally, click the "Save Connection" button in AutoKitteh's GitHub connection UI
Repository Permissions
Your choices in this section depend on a balance between functional needs and security constraints: which GitHub API calls you expect AutoKitteh scripts to make, and which GitHub API events you expect AutoKitteh scripts to respond to.
Here are some common examples:
- Actions (read and write)
- Administration (read-only)
- Commit statuses (read and write)
- Contents (read-only)
- Issues (read and write)
- Metadata (read-only)
- Pull requests (read and write)
Events
Your choices in this section depend on which GitHub API events you expect AutoKitteh scripts to respond to.
Here are some common examples: