Skip to main content

GitHub Configuration

Creating an Access Token in GitHub

Required Token Permissions

Create the access token:

  1. Log in to GitHub.

  2. In the upper-right corner click your avatar and select Settings.

  3. In the left menu click Developer Settings.

  4. In the left menu click Personal Access Tokens.

  5. Click the Generate new token button.

  6. Configure the token with the Required Token Permissions

  7. Save the personal access token. You will not be able to view this token again.

126654783.png

See this explanation for details of GitHub scopes.

Creating a fine-grained personal access token in GitHub

Repository Permissions

Access

Repository Access

All repositories

Administration

Read-only

Commit statuses

Read and write

Deployments

Read-only

Metadata

Read-only

Pull requests

Read and write

Create the access token

  1. Log in to GitHub.

  2. In the upper-right corner click your avatar and select Settings.

  3. In the left menu click Developer Settings.

  4. In the left menu select Fine-grained Tokens.

  5. Click the Generate new token button.

  6. Configure the token with the Required Token Permissions

  7. Save the personal access token. You will not be able to view this token again.

Protecting the Target Branch in GitHub

You can prevent users from merging Pull Requests with failing IQ Policy Evaluations with a Branch Protection Rule. IQ Policy Evaluations must be set to Fail at the Source Stage.

To protect a branch:

  1. Select a Repository.

  2. Click Settings.

  3. Select Branches from the sidebar.

  4. Click Add rule or edit an existing rule.

  5. Check to Require status checks to pass before merging.

  6. Check IQ Policy Evaluation.

  7. Save Changes

126654802.png

Note

The IQ Policy Evaluation status check will not appear in the list of status checks found in the last week for this repository until the first policy evaluation status has been added to the repository.

126654803.png