Configure GitHub Posting User

Code reviews for your GitHub Enterprise projects will be posted as a "PullRequest" member of your GitHub team. In order to post code reviews, the user must be created in your GitHub.

Prerequisites

The GitHub posting user must be created by an individual on your team with the following administrative permissions:

Create Posting User

Log in to your GitHub instance as an administrator and create a new user with the username PullRequest. PullRequest reviewers and systems will use this user to post code review content.

We also recommend adding the PullRequest logo as the posting user's avatar:

Add Posting User to Projects

Add the PullRequest user to all of the organizations/repositories you want code review on. Be sure to grant the user WRITE access so it's able to list repository collaborators and post comments.

In order to list a repository's collaborators, WRITE permissions are required. That said, PullRequest will never write or modify code in your repositories. Read more about how we keep your code and data secure here.

Create GitHub Access Token

Log into GitHub as the PullRequest user you just created.

This may be easier in another browser or in an incognito tab so you can remain logged in as the GitHub owner user.

Open Settings -> Developer settings -> Personal access tokens. This should be accessible from the following path using your own instance's domain instead of our-github.internal:

https://our-github.internal/settings/tokens

Click Generate new token and create a Personal Access Token with the following properties:

Once generated, copy the personal access token to your clipboard so we can configure the connection to GitHub.

Connecting the PullRequest Proxy to GitHub

Now, it's time to return to that text file we're editing on the proxy server. Go ahead and set the following keys based on what was configured above.

PROVIDER_TYPE=github
PROVIDER_BASE_URL=https://our-github.internal/api/v3
PROVIDER_USERNAME=PullRequest
PROVIDER_ACCESS_TOKEN=<access_token>

Make sure the GitHub URL represents the path to the version 3 of the GitHub API

Make sure the PullRequest Username is spelled exactly as the username of the PullRequest user that was created. We highly recommend "PullRequest" (all one word, PascalCase) to maintain communication consistency.

Last updated