To the people running gitlab-runners: Please upgrade to 13.12 to avoid future incompatibilities when we migrate to GitLab 14

GitHub project integration (PREMIUM)

Introduced in GitLab Premium 10.6.

GitLab provides an integration for updating the pipeline statuses on GitHub. This is especially useful if using GitLab for CI/CD only.

This project integration is separate from the instance wide GitHub integration and is automatically configured on GitHub import.

Pipeline status update on GitHub

Configuration

This integration requires a GitHub API token with repo:status access granted.

Complete these steps on GitHub:

  1. Go to your Personal access tokens page at https://github.com/settings/tokens.
  2. Select Generate new token.
  3. Under Note, enter a name for the new token.
  4. Ensure that repo:status is checked and select Generate token.
  5. Copy the generated token to use in GitLab.

Complete these steps in GitLab:

  1. Go to the project you want to configure.
  2. Go to the Integrations page
  3. Select GitHub.
  4. Ensure that the Active toggle is enabled.
  5. Paste the token you generated on GitHub.
  6. Enter the path to your project on GitHub, such as https://github.com/username/repository.
  7. (Optional) To disable static status check names, clear the Static status check names checkbox.
  8. Select Save changes or optionally select Test settings.

After configuring the integration, see Pipelines for external pull requests to configure pipelines to run for open pull requests.

Static / dynamic status check names

  • Introduced in GitLab 11.5: using static status check names as opt-in option.
  • In GitLab 12.4, static status check names is default behavior for new projects.

This makes it possible to mark these status checks as Required on GitHub.

When Static status check names is enabled on the integration page, your GitLab instance host name is appended to a status check name.

When disabled, it uses dynamic status check names and appends the branch name.