The Hopsule GitHub integration lets you:Documentation Index
Fetch the complete documentation index at: https://docs.hopsule.com/llms.txt
Use this file to discover all available pages before exploring further.
- Import a repo as the source-of-truth for a project — file structure, history, and pull requests feed into Brain.
- Analyse pull requests on every push — decisions you marked
ACCEPTEDbecome guardrails, and any change that conflicts with one is surfaced as a violation on the PR. - Drive automation with webhook events when analyses complete or violations are detected (see Webhooks).
Install the Hopsule GitHub App
Open Settings → Git Providers
From the organization dropdown, choose the org you want to connect.
Inside Settings, click the Git Providers tab.
Add GitHub
Click + Add provider → GitHub. You’ll be redirected to GitHub
to install the Hopsule GitHub App on either your personal account
or an organization you administer.
Choose repositories
During installation, pick All repositories if you want Hopsule to
see every repo in the account, or Only select repositories if
you’d rather opt in repo-by-repo. You can change this at any time
from your GitHub settings.
An organization can connect multiple GitHub installations side by
side — e.g. one for your personal account and one for the company’s
GitHub org. The Analyse Repository dialog lets you pick which one to
pull from each time you import.
Import a repository
There are two entry points: From the dashboard: click + New project. The picker lists every repo across every connected provider — search, pick one, and the project name and description auto-fill from the repo metadata. Saving creates the project and queues the import in one shot. From an existing project: open the project, then click Analyse Repository in the header. The dialog walks you through provider selection and repo pick. While the import runs, the project page shows a live progress card with the import status (clone → discover → extract → save). When it finishes, the dashboard refreshes and Brain becomes browsable.Pull request analysis
Once a repo is connected, every push to a pull request branch triggers analysis. Hopsule:- Diffs the change against the repo’s accepted decisions.
- Detects any change that contradicts a decision (e.g. a decision says “use library X”, PR introduces library Y).
- Posts a check run on the PR with the findings.
Required permissions
The Hopsule GitHub App requests:| Scope | Used for |
|---|---|
contents:read | Cloning the repo for indexing and PR analysis. |
metadata:read | Listing repos in the picker. |
pull_requests:read + write | Reading PR diffs and posting check runs. |
members:read | Resolving which installations are visible to your org. |
Org-scoped installation filter
Hopsule only shows GitHub installations whose installers are also members of your Hopsule organization. This prevents an outside user from exposing their GitHub installation to your workspace just because they ran the OAuth dance once. The lookup is enforced server-side via theUserOAuthAccount join — see
the authority model for details.
Webhook events related to GitHub
If you’ve configured an outbound webhook (see Webhooks), these events fire as the GitHub integration runs:| Event id | When |
|---|---|
project.import_completed | A repo import finished successfully. |
project.import_failed | A repo import errored (payload includes the reason). |
pr.analysis_completed | Hopsule finished scanning a pull request. |
pr.violation_detected | A PR change conflicts with an accepted decision. |
pr.results_accepted | An admin accepted proposed PR findings. |