CodeScene Integration with GitHub Checks

Codescene can integrate with GitHub to provide quality gates for Pull Requests on the Checks tab. To do this, you must create a GitHub App and use the settings for that app when configuring CodeScene.

Follow these steps to enable the Check:

1. Creating a GitHub App

Follow Steps 1–5 here to start creating your GitHub App. Then do the following settings.

  • Homepage URL. The Homepage URL setting is required by GitHub, but you can set it to anything (such as https://www.codescene.io/ ).

  • Webhook. Set to not active. You will activate it after doing settings in CodeScene.

  • Repository Permissions Grant the following permissions:

Permission

Access

Checks

Read & write

Pull Requests

Read & write

  • Click Create GitHub App. This will take you to your new GitHub App’s page.

  • Private Key. Scroll down to the bottom of the page and click Generate Private Key. This will download a .pem file.

  • Click Save changes.

2. Configure CodeScene’s PR integration

Go to the PR integration tab in the CodeScene project configuration and do the following settings:

  • Select GitHub App.

  • App ID. Copy the value from your GitHub App and set it here.

  • Private Key. Select the .pem file you downloaded when creating the App.

  • Webhook Secret. Specify a value that will be used for encrypting webhook calls.

  • Save the CodeScene GitHub App configuration.

3. Configure the webhooks on your GitHub App

Go to the configuration page for your GitHub App and do the following settings:

  • Webhook. Set to active

  • Webhook URL. Copy the value from the CodeScene GitHub App configration and set it here.

  • Webhook Secret. Set the same value as in your CodeScene Github App configuration.

  • Subscribe to events. Go to the Permissions & Events tab and add subscriptions to Check run, Check suite and Pull request events.

  • Click Save Changes

Install your GitHub App from the settings page for the app. Codescene will now receive webhook calls when PRs are created or updated on any repositories where you have installed the App.