Step 6 of 15

Connect GitHub to Pullwise

Connect GitHub repositories to Pullwise with a fine-grained access token and a pull request webhook signed with your secret, step by step.

6 min For adminsUpdated

Works with github.com and GitHub Enterprise Server. GitHub calls them pull requests. Pullwise treats them exactly like merge requests.

1. Create an access token in GitHub

Create a fine-grained personal access token, ideally on a bot account (a “machine user”) that’s a member of your organisation. Reviews are posted as that account.

  1. In GitHub, go to Settings → Developer settings → Personal access tokens → Fine-grained tokens → Generate new token.

  2. Resource owner: your organisation.

  3. Repository access: All repositories, or Only select repositories for the ones you want reviewed.

  4. Repository permissions:

    Permission Access
    Contents Read-only
    Pull requests Read and write
    Metadata Read-only (added automatically)
  5. Set an expiration and select Generate token. Copy it straight away. Fine-grained tokens start with github_pat_.

2. Save it in Pullwise

  1. Open SCM and select Connect on the GitHub card.
  2. Paste the Access token.
  3. Paste your Webhook secret. GitHub webhooks are rejected without one.
  4. GitHub Enterprise Server only: set API base to your server’s API URL, for example https://github.example.com/api/v3. Leave it blank for github.com.
  5. Select Save, then switch GitHub on.
Connect GitHub dialog with the access token and webhook secret filled in
Connect GitHub with your token and webhook secret. Tap the image to enlarge it.
SCM screen with GitLab and GitHub both Connected
GitHub shows Connected once the token is saved and the switch is on. Tap the image to enlarge it.

3. Add the webhook in GitHub

Type your workspace subdomain to fill in the URL:

Webhook URLhttps://your-subdomain.pullwise.ai/v1/webhooks/github

In the repository, go to Settings → Webhooks → Add webhook. To cover every repository at once, add it in your organisation’s settings instead.

Add webhook
Payload URL
https://acme.pullwise.ai/v1/webhooks/github
Content type
application/json
Secret
••••••••••••••••••••••••
Which events would you like to trigger this webhook?Just the push eventLet me select individual events → Pull requests
Active
Add webhook
Illustration of the webhook form in GitHub, filled in. Labels match GitHub; the layout is simplified.
  1. Payload URL (1): your webhook URL from above.
  2. Content type: application/json.
  3. Secret (2): your webhook secret.
  4. Which events (3): choose Let me select individual events, tick Pull requests, and untick Pushes.
  5. Leave Active ticked and select Add webhook.

4. Test it

GitHub sends a ping event as soon as you save. Open the webhook’s Recent deliveries tab.

What triggers a review

A pull request being opened, reopened or synchronized (new commits pushed). Other pull request actions, such as labels and review requests, are ignored.

If something goes wrong

Open Recent deliveries on the webhook, select a delivery, and check the Response tab.

Response Cause Fix
401 The secret doesn’t match, so the signature check failed Re-enter the same secret in GitHub and Pullwise.
404 Wrong workspace subdomain in the URL Check the Payload URL.
201 with ignored Not a pull request event, or GitHub is switched off in Pullwise Tick Pull requests and check the card says Connected.
The comment isn’t posted The token lacks Pull requests: Read and write, or can’t see the repository Edit the token’s permissions and repository access.
Content type errors The webhook sends application/x-www-form-urlencoded Change Content type to application/json.

More fixes in troubleshooting.

Next

Choose which repositories are reviewed.

Stuck? Ask the assistant, check troubleshooting or contact support.

Choose which cookies we may use. You can change this at any time from the footer.

Cookie categories