New here? Start with the OAuth setup overview for the shape and prerequisites that apply to every provider.
Before you begin
You’ll need:- Organization admin access in Ravenna.
- A GitHub account with permission to create an OAuth App in your organisation (Settings → Developer settings).
- An idea of which scopes your function will need. For example,
repoto read or write private repos,read:orgto read org membership, orpublic_repofor public-only access.
1. Create the OAuth App in GitHub
1
Open Developer settings
Go to your organisation (or personal) Settings → Developer settings → OAuth Apps and click New OAuth App.Creating it under the organisation is usually what you want, since the app then belongs to the org rather than to one person’s account.
2
Fill in the basics
- Application name. For example, “Ravenna Foundry.”
-
Homepage URL. Your Ravenna URL (e.g.
https://app.ravenna.ai). -
Authorization callback URL. Ravenna’s OAuth callback:
Replace
app.ravenna.aiwith your custom domain if you use one.
3
Generate a client secret
On the app page, click Generate a new client secret and copy it immediately. GitHub only shows it once. Also copy the Client ID shown at the top.
GitHub OAuth Apps don’t have a per-app scope list. Scopes are requested at sign-in time, and you’ll set them in Ravenna in the next section.
2. Register the provider in Ravenna
1
Open Settings → OAuth Providers
In Ravenna, go to Settings → OAuth Providers and click Add Provider.
2
General tab
Fill in:
- Name. For example, “GitHub.”
- Slug.
github. - Description and Logo. Optional but helpful.
- Base URL.
https://api.github.com. - Docs URL.
https://docs.github.com/en/rest.
3
OAuth tab
Fill in the details from GitHub:
- Authorization URL.
https://github.com/login/oauth/authorize - Token URL.
https://github.com/login/oauth/access_token - Scopes. The GitHub scopes your function needs, space-separated. Common examples:
repofor full access to public and private repos.public_repofor public-repo access only.read:orgto read org membership.workflowto read and update GitHub Actions workflows.
- Client ID and Client secret. Paste the values from GitHub.
- Token exchange parameters:
4
Research and save
Foundry researches the docs URL. Once it finishes, the provider is enabled and shows up in Settings → Integrations under the Custom category.
3. Connect an account
Each user who runs a function connects their own GitHub account once:- Go to Settings → Integrations, find GitHub in the Custom category, and click Connect.
- GitHub shows the consent screen listing the scopes you requested. Approve.
- You’re back in Ravenna with a connected account.
GitHub OAuth tokens don’t expire by default, so users won’t need to reconnect unless they explicitly revoke access from GitHub’s Authorized OAuth Apps page.
4. Build a function on top
Open Foundry, click New Function, and connect the GitHub provider in the function’s Integrations tab. Pick which connected GitHub account the function should run as. Then describe what you want it to do:- “Create a GitHub issue in
acme/backendwith the given title and body. Apply thetriagelabel and return the issue URL.” - “List the open pull requests in
acme/frontendassigned to me. Return the title, author, and URL for each.” - “Comment on a pull request given its URL and a body. Return the comment URL.”
Full build → test → refine → publish loop: Building functions.