# Using Github Apps
# Difference between Github App vs OAuth App
Github App | OAuth App |
---|---|
Installing a GitHub App grants the app access to a user or organization account's chosen repositories. | Authorizing an OAuth App grants the app access to the user's accessible resources. |
Installation access tokens from a Github App will loses access to resources if an admin removes organizations or repositories from the installation | OAuth access token loses access to resources when the user loses access |
You must be an organization owner, personal repository owner, or have admin permissions in a repository to uninstall a GitHub App and remove its access. | You can delete an OAuth access token to remove access. |
Installation tokens expire after a predefined amount of time (currently 1 hour). | OAuth tokens remain active until they're revoked by the user. |
The maximum rate limit for an installation is 12,500 requests per hour. | OAuth tokens use the user's rate limit of 5,000 requests per hour. |
For more informations, please visit Github App docs
# Use case to use Github App
GitHub App uses its own identity when installed on an organization or on repositories within an organization. Using Github App give you more powerful way to manage access to your resources and more security.
# How to install Github App
For user's repository
- Go to Sun* CI apps at GitHub Marketplace to install.
- Chose your workspace which you want to use Github App.
- There are two options to install:
- All repositories (include new repository will be created after install Github App).
- Only select repositories.
- Chose install and you will be redirected to your workspace in Sun* CI.
For organization's repository
- Go to Sun* CI apps at GitHub Marketplace to install.
- Chose your organization which you want to use Github App.
- There are two options to install:
- All repositories (include new repository will be created after install Github App).
- Only select repositories.
- Each role in organization have different ways to install:
- If you are admin of repository, your request for install Github App will be sent to organization's owner and you will be redirected to your workspace in Sun* CI. After organization's owner accept your request, Github App will install direclty.
- If you are owner of organization, chose install and you will be redirected to your workspace in Sun* CI.
# How to enable CI for new repository by using Github App
When you are using Github App for some repositories and you want add new repo reposiotry to it, you will need to follow these steps:
- Go to Sun* CI apps at GitHub Marketplace to configure.
- Chose namespace which has your new repository.
- Add new repository.
- Chose
Save
. - Get back to Sun* CI, you will see your new repository was enabled by Github App.
# How to uninstall Github App
- Go to Sun* CI apps at GitHub Marketplace to configure.
- Chose namespace which you want to uninstall.
- Chose
Uninstall
and confirm.
# Attention
Before using Github App, you need to grant access to OAuth App because Sun* CI using OAuth access token for Sync account
. When you install Github App for organizations which OAuth App can not access and you Sync account
, your account will lose all permission to these repositories within organization.