Connect GitHub to PRLane
PRLane reads and acts on your pull requests through one GitHub connection per organization. Here is what it asks GitHub for, how webhooks keep every PR current, and what to do when a webhook can't be added.
Connect GitHub
- Sign up, or open your organization in PRLane. During onboarding PRLane asks you to connect GitHub; later you can do it from the organization's GitHub integration page.
- Approve PRLane on GitHub. Only owners and admins of the PRLane organization can connect GitHub, because the connection is shared by everyone in it.
- Pick the repositories to manage. You can add more later in Organization settings → Repositories, and link each one to a workspace.
What PRLane asks GitHub for
PRLane connects with a GitHub OAuth authorization. It requests two scopes:
repo: read and act on pull requests in public and private repositories (merge, update branches, labels, reviews), and manage their webhooks.read:org: list the GitHub organizations you belong to, so you can pick their repositories.
If your GitHub organization restricts OAuth apps, an organization owner has to approve PRLane in GitHub under Settings → Third-party access before its repositories appear.
workflow scope to merge a pull request that changes files under .github/workflows. When the connected authorization doesn't have it, PRLane marks those PRs Merge on GitHub instead of attempting a merge GitHub would refuse. Merge them on github.com.Webhooks
PRLane registers a webhook on each repository you add, so pull request changes reach it within seconds. Each webhook has its own secret, and PRLane rejects any delivery whose X-Hub-Signature-256 doesn't match. You don't need to create anything on GitHub by hand.
| Events | Used for |
|---|---|
pull_request | Opened, edited, synchronized, closed, merged and labeled PRs |
pull_request_review, pull_request_review_comment, pull_request_review_thread | Review decisions, comments and resolved threads |
issue_comment | PR conversation comments, including preview links |
check_suite, check_run | CI status for each PR head |
workflow_run, workflow_job | GitHub Actions runs and jobs, used for CI cost |
push | Commits pushed to branches |
- GitHub only lets a repository admin manage its webhooks. If the person who connected GitHub isn't an admin of a repository, or its GitHub organization hasn't approved PRLane, the webhook can't be added: ask a repository admin to reconnect GitHub, or use polling below.
- The GitHub integration settings page lists every repository's webhook with Verify and Re-register. Re-register fixes a webhook that was deleted or edited on GitHub.
- Some deployments also run a scheduled webhook check; the settings page shows whether it is on and the last result for each repository.
Polling without webhooks
For a repository whose webhook GitHub won't let PRLane read or create, choose Poll without webhooks on the GitHub integration settings page:
| Mode | What happens |
|---|---|
| Off | Updates arrive through the webhook (the default). |
| Every 5 minutes while someone is on PRLane | While anyone in the organization has PRLane open, its PRs are refreshed from GitHub every 5 minutes, unless something just refreshed them. |
| Every hour | PRs are refreshed from GitHub once an hour, even when nobody is on PRLane. |
Polling uses the same GitHub rate limit as everything else PRLane does for your organization, so keep webhooks on where you can. You can also refresh PRs at any time from Fleet.