Skip to content

Interacting with GitHub

brianmoose edited this page Dec 21, 2017 · 5 revisions

These are the details on how to get CIVET to interact with GitHub.

OAuth Application

You will need to create a OAuth application on GitHub. This can be done under <user icon> -> Settings -> OAuth applications. This should be created by a user that will be trusted by all repositories that CIVET will handle. When a user logs into CIVET, they will be asked to trust this application. Every user that will be responsible for recipes ( build_user in a recipe ) needs to log into CIVET and trust the application. This allows CIVET to make requests to GitHub on behalf of the user. Other users do not necessarily need to trust this application to see and use CIVET.

When you create the OAuth application it will ask for an Authorization callback URL. This should be set to ABSOLUTE_BASE_URL/github/callback/github.com/ where ABSOLUTE_BASE_URL is set in civet/settings.py. Note that ABSOLUTE_BASE_URL needs to be a https URL. It will give you a Client ID and a Client Secret. These should be copied into the GitHub configuration dictionary in civet/settings.py with keys client_id and secret_id. The Client Secret should be kept secret and you should be careful not to commit this to the repository if it is publicly accessible.

Collaboration

CIVET can work with any number of repositories owned by any user. To do this it is required that the user that handles the recipe (build_user in a recipe) is a collaborator on the repository. To add a user as a collaborator on a repository, go to Settings -> Collaborators on the repository. Enter the user name in the box and press the Add collaborator button. This will send a link to the user that they will have to accept.

See Setting up a GitHub repository to be tested

Clone this wiki locally