Using the CircleCI GitHub App in an OAuth organization
This guide explains the two different ways your CircleCI organization can integrate with GitHub and how they affect the following:
-
The type of pipeline you can set up .
-
The triggers you can use.
Through reading this guide you will better understand your integration options, and how to leverage both for maximum functionality.
Two types of GitHub integration
CircleCI offers two methods for integrating with GitHub:
- GitHub OAuth app integration
-
This integration is built-in for organizations with
/github/
in their URL. The GitHub OAuth app integration cannot be uninstalled from these organizations, nor installed on any other org type. - GitHub App integration (recommended)
-
The CircleCI GitHub App is an add-on integration. The GitHub App can be installed or uninstalled on organizations with
/github/
or/circleci/
in their URL, including organizations that are already integrated with GitHub through the OAuth integration. Compared to the GitHub OAuth app, the GitHub App offers increased control over the resources that CircleCI can access. The GitHub App only asks for fine-grained permissions, and uses short-lived tokens when accessing resources.
The majority of new CircleCI work triggering functionality will be made available through the GitHub App integration. We recommend installing the CircleCI GitHub App to ensure access to all new features. |
Organization type identified by URL | GitHub OAuth integration | GitHub App integration | Notes |
---|---|---|---|
|
built-in |
add-on |
Organization name, roles, permissions, and projects inherited from GitHub |
|
Not available |
add-on |
Independent user, permissions and project management |
|
Not available |
Not available |
- |
Pipeline types
When both GitHub integrations are installed in the same organization, different pipeline types can coexist within the same project. Each pipeline type has distinct characteristics and capabilities.
All GitHub pipeline types can be managed through | .
OAuth pipeline | GitHub App pipeline | |
---|---|---|
If you are a long time CircleCI user, this is the classic pipeline you will be familiar with. Identified by a gray badge: |
Only available once the CircleCI GitHub App has been installed. Identified by a purple badge: |
|
Pipeline characteristics |
|
|
Available triggers |
GitHub OAuth triggers
Schedules
API / Manual |
GitHub App triggers
Custom Webhook triggers
Schedules API / Manual |
Summary of trigger availability by pipeline type
The following table summarizes the trigger availability by pipeline type.
Pipeline type | OAuth trigger | Schedule trigger | GitHub App trigger | Custom Webhook | API / Manual triggering |
---|---|---|---|---|---|
GitHub OAuth |
Zero or one |
Zero, one, many |
No |
No |
Yes |
GitHub App |
No |
No |
Zero, one, many |
Zero, one, many |
Yes |
Installing the CircleCI GitHub App alongside the GitHub OAuth app
Organizations with /github/
in their URL can leverage both GitHub integration types simultaneously to access new functionality.
Installation steps
Installing the CircleCI GitHub App is a one-time action that enables all new features across the entire organization. Only organization admins can take this action.
-
Navigate to
. -
Select Install GitHub App.
-
Select repositories to grant access.
-
Create new GitHub App pipelines alongside existing OAuth pipelines. This can be achieved in the following ways:
-
Navigate to
-
Via API
-
Via CLI
-
If you run into issues while installing the CircleCI GitHub App, submit a request through this form. A member of our team will be in touch promptly.
Authorization steps
Once the GitHub App is installed, each user must authorize the CircleCI App by clicking on the Authorize button displayed on the web app top bar for unauthorized users.
Authorizing the GitHub App ensures that users can:
-
Trigger pipelines from the CircleCI web app.
-
Run builds, if the flag Prevent unregistered user spend is set to On.
-
Run builds, if they require access to contexts.
If you run into an issue while attempting to authorize, submit a request through this form. A member of our team will be in touch promptly.
Benefits of dual integration
Dual integration provides the following benefits:
-
Access to new GitHub App features while maintaining existing OAuth pipelines. Key functionality enabled through the GitHub App integration includes the following:
-
The option to have multiple pipelines in the same project, each defined in its own YAML file.
-
The possibility to set up your pipelines so that the config file and the application code are stored in different repositories. Refer to the changelog entry for more information.
-
A more flexible trigger system, with each pipeline having any number of VCS or non-VCS triggers. This includes:
-
Non-repo based triggers: Custom webhooks enable triggering builds from any system that can emit webhook events. Refer to our community forum for an example and known limitations.
-
Cross-repo triggers: Events in one repository can trigger builds on one or many other repositories.
-
More GitHub events as triggers: Pipelines can be set up to run on events other than push, including pull request events, with more powerful customization of trigger conditions. For full details, see the GitHub trigger event options page.
-
-
-
Gradual migration path for complex projects
-
New trigger options without disrupting current pipelines
Troubleshooting
Can I convert an OAuth pipeline to a GitHub App pipeline?
Pipelines cannot be directly converted.
Instead, if you want to stop building through the OAuth integration, duplicate the OAuth pipeline as a GitHub App pipeline, then remove the OAuth GitHub trigger.