GitHub Enterprise Repositories¶
GitHub Enterprise support requires a license of Power Pack. You can download a trial license or purchase a license for your team.
Review Board supports posting and reviewing code on GitHub Enterprise repositories, using public or private personal repositories or organization-owned repositories.
Existing commits in a repository can be browsed and put up for review. Pull requests, however, are not currently supported (though planned for a future release).
To simplify posting changes to Review Board, we recommend using RBTools. This ensures that the diffs are in the correct format, and makes managing review requests much easier. See Using RBTools with Git for more information.
Adding the Repository¶
To configure a GitHub Enterprise repository, first proceed to add the repository and select GitHub Enterprise from the Hosting type field.
Step 1: Link Your GitHub Enterprise Account¶
You will need to link an account on GitHub Enterprise to Review Board, so that Review Board can access content from the repository. If you’ve already linked an account with sufficient access to the repository, you can use that instead.
If you’re linking for the first time, you’ll need to make sure you have your username and Personal Access Token handy.
Linking requirements changed in Review Board 3.0.18
Older versions of Review Board and Power Pack accepted a standard GitHub account password, which would be used to automatically create an access token on your behalf. Since this capability is deprecated in GitHub, Review Board 3.0.18/Power Pack 3.0.3 and higher require that you create this token yourself.
If you are running an older version and cannot link an account, you will need to upgrade Review Board and Power Pack.
Fill out the following fields:
- Service URL:
The URL to the root of your GitHub Enterprise server. For example,
- GitHub Username:
The username used to log into your GitHub account. This is not your e-mail address.
- Personal Access Token:
A GitHub Personal Access Token, created in your GitHub account under Settings -> Developer Settings -> Personal Access Tokens.
When creating a new token, give it a descriptive name and enable the following scopes:
The account will be linked when the repository is saved. If there are errors authenticating the user or retrieving an access token, you will be prompted to fix them.
Step 2: Provide Repository Information¶
Next, you’ll need to fill out the following fields:
- Repository plan:
This specifies the type of the repository, whether it’s public/private or personal/team. You’ll have one of the following choices:
Public: The repository is owned by the linked user account, and is publicly-accessible to any user.
Public Organization: The repository is owned by an organization, and is publicly accessible to any user.
Private: The repository is owned by the linked user account, and is accessible only to the linked user and other GitHub Enterprise users who were granted permission.
Private Organization: The repository is owned by an organization, and is accessible only to the linked user and other GitHub Enterprise users who were granted permission.
The public/private options have no bearing on who can access review requests on this repository in Review Board. See Step 4: Manage Access Control.
- Organization name:
If you’re using an organization-based plan, you will need to specify the organization name in the Organization name field. This is the same value you would find in the URL. For example, if your repository was
https://github.example.com/myorg/myrepo/, your organization name would be
- Repository name:
You’ll then need to specify the name of your repository in the Repository name field. This is the same value you would find in the URL. In the above example, your repository name would be
Step 3: Choose a Bug Tracker¶
If you’re using the issue tracking feature on this repository, you can simply check the Use hosting service’s bug tracker checkbox. All bug IDs will link to the appropriate issues for your repository.
If you’re using a separate bug tracker, or a separate repository on GitHub Enterprise, you can leave the checkbox unchecked and choose a bug tracker from the list.
Step 4: Manage Access Control¶
You can now choose who should have access to this repository (both posting against it and viewing review requests posted against it). This is separate from GitHub Enterprise’s own access controls.
Step 5: Save the Repository¶
At this point, you should be able to save the repository. If saving succeeds, you’re done! You can start posting changes for review.
Configuring Repository Hooks¶
Review Board can close review requests automatically when pushing commits to GitHub Enterprise. This is done by configuring a WebHook and pointing it to your Review Board server, and then referencing the review request in your commit message (which is done for you when using rbt land).
Let’s go over how to set this up.
Add the WebHook¶
On Review Board, view the list of repositories and locate the repository you want to configure hooks for. Beside the repository name, you’ll see a Hooks link. Click that and you’ll see instructions for configuring the hook.
The instructions will contain a link taking you to the page on GitHub Enterprise for adding a new WebHook, along with all the information you need in order to add the hook. Simply follow the instructions and you’ll be ready to go.
Tag Your Commit Messages¶
To close a review request for a given commit, you’ll need to add some special
text to your commit message that references the review request. This can be in
the form of
Reviewed at review_request_url or
#id. This must be on its own line, but can appear anywhere in the commit
Reviewed at https://reviewboard.example.com/r/123/
Review request #123
If you use rbt land, this will be automatically added for you when landing your changes.