Skip to content

GitHub integration

Last updated: 6 December 2026 · API v1 (beta)

The GitHub integration opens agent runs to private repositories. You install the hadronbox GitHub App on your account or organization; the agent clones the repository, commits its changes to a hadronbox/run-<short id> branch, pushes it and opens a pull request. The pull request link is on the run page and in the prUrl field of the agent.run.* webhook events.

GitHub App only. No personal access token (PAT) is asked for or stored. Only the organization's owner or admin can connect, change and remove the connection.

Connecting

  1. Open Integrations in the panel and choose Connect GitHub.
  2. On GitHub, pick the account to install the App on and the repositories (all or selected).
  3. You return to the panel; the connection card shows the account name, status and the repository list.

If this page says "not configured yet", the platform has no GitHub App settings; that is a setup task and has nothing to do with your account.

A GitHub account can be connected to one organization at a time; connecting an account that belongs to another organization is refused. Removing the connection deletes the hadronbox side; to remove the App from GitHub too, do it in your GitHub settings.

Running an agent on a private repository

In the Run agent form, pick the repository from Connected GitHub repository; the address fills in. The AI key for the agent still comes from a secret. During the run hadronbox mints a short-lived GitHub access token for that one repository only:

  • The token is limited to contents, pull request and issue write access and to a single repository.
  • It is never written to the database, a log, a command line or a URL; it reaches the machine only as the environment variable of that command and is removed from the environment before the agent starts.
  • A separate fresh token is minted to push the branch. Token values in the agent's output are masked.

Triggering with an issue label

The connection card holds a trigger label (default hadronbox), a default agent and the name of the secret the agent uses. When you add that label to an open issue in a connected repository:

  1. GitHub is asked whether the person who added the label has write permission on the repository.
  2. The issue title and body become the task; the budget and credit checks are the same as for a manual start.
  3. hadronbox leaves a start and a finish comment on the issue; the result is a pull request.

Labels added by bots and pull requests are ignored. An organization can start at most 10 issue triggers per hour.

Security notes

  • Webhook requests are verified with the X-Hub-Signature-256 signature over the raw body and are protected against replay with X-GitHub-Delivery.
  • The state in the install link is signed, short-lived and bound to the organization and the user.
  • When GitHub user verification is enabled, the panel also checks that you own the installation before connecting it.
  • Actions are written to the audit log: github.connect, github.disconnect, github.settings_update, github.issue_trigger.

Common outcomes

OutcomeMeaning
github_unavailableThe GitHub token could not be minted (the installation may be removed or suspended)
pr_failedThe change was committed but the branch could not be pushed or the pull request opened
clone_failedThe repository could not be cloned; check that the App can access it
Comment on the issue, no runThe label author lacks write access, or the secret / budget is missing
GitHub integration · hadronbox docs