Connections
Working with GitHub
Review GitHub pull requests in Fettlecode with reviews sent back, and let people sign in with their GitHub accounts.
GitHub pull requests, both ways
Keep a repository on GitHub and review its pull requests in Fettlecode. Pull requests opened on GitHub become changes here and follow along as new commits are pushed and when they're closed. Approvals and requests for changes go back to GitHub as reviews, with a status on the pull request, and merging here closes it there.
Connect a repository
- In the Fettlecode repository's Settings → GitHub pull requests, enter the GitHub repository (
owner/name). - Give an access token that can read and write pull requests and commit statuses. It's kept encrypted. If your admin has set up a GitHub App, you can leave the token empty and install the app on the repository instead.
- Choose Connect. Fettlecode then shows one more step on GitHub: in the GitHub repository's Settings → Webhooks, add a webhook with the payload URL and secret shown (shown only once), content type
application/json, and under Let me select individual events, tick Pull requests. - Bring in open pull requests now to import the ones already open.
Disconnect stops it; changes already brought across stay.
Fettlecode needs to be reachable from GitHub for the webhook to work. Behind a firewall, GitHub can't tell it about new pull requests.
For admins: the GitHub App
A GitHub App saves each repository from needing a token. Make one on GitHub (or GitHub Enterprise Server), with read and write access to pull requests and commit statuses, then set GITHUB_APP_ID, GITHUB_APP_PRIVATE_KEY and GITHUB_APP_WEBHOOK_SECRET. See Settings.
Sign in with GitHub
When your admin has set it up, the sign-in page offers Sign in with GitHub. To add it to an account you already have, go to Your settings → Connected accounts.
Admins: make an OAuth app on GitHub with the callback <APP_URL>/api/auth/callback/github, then set GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET. For GitHub Enterprise Server, also set GITHUB_URL and GITHUB_API_URL.
Importing from GitHub
To move a repository over for good, see Moving to Fettlecode.