Inspect

GitHub

GitHub is how Inspect reads your code and ships changes. The organization installs the Inspect GitHub App once per GitHub organization; each person then links their own GitHub account so Inspect can push branches and open pull requests as them.

Requirements

  • Installing or disconnecting the GitHub App in Inspect needs the Manage integrations role.
  • Installing the App on a GitHub organization needs an owner of that organization. Anyone else can request the installation, and an owner approves it on GitHub.
  • Adding the App's repositories to Inspect is a separate step. See Repositories.

Connecting GitHub organizations and Slack

Install the GitHub App

  1. Open Settings → Integrations and choose GitHub.
  2. Choose Install GitHub App. On GitHub, pick the organization and the repositories the App can access.
  3. Back in Inspect, a GitHub App installed notice confirms the connection. If you aren't an owner, you see Installation requested until an owner approves it on GitHub.
  4. Add the repositories you want sessions to work in under Repositories.

To add another GitHub organization, choose Install on another organization and repeat. If the App is already installed on an organization, for example after an owner approved your request, Inspect lists it as ready to connect; choose Connect.

Inspect only connects installations that your own GitHub account can see, and each GitHub organization can be connected to one Inspect organization.

Repository access

The App's repository access on GitHub sets the outer limit of what Inspect can reach. If a repository is missing or adding it fails, grant it in the installation's repository access on GitHub. Manage on GitHub opens that page for each connected organization.

Disconnect removes an organization from Inspect. Sessions can't use its repositories until you connect it again.

GitHub Enterprise Server

On Inspect deployments that support GitHub Enterprise Server, an admin creates a dedicated GitHub App for your server with Create GitHub App, entering the GitHub Enterprise Server URL and the GitHub Organization that will own the App. Creating the App disconnects members' GitHub accounts, so each member links their account on the server afterward. Then install the App as above.

Each person links their GitHub account in Settings → Profile. Without a linked account, Inspect is read-only for you: it can read code and suggest changes, but it can't push, open pull requests, or run automations on your behalf.

If your GitHub authorization expires or is revoked, Inspect reports GitHub access expired. Reconnect so Inspect can open and update pull requests as you. Reconnect from the same page.

What Inspect does on GitHub, and as whom

  • Commits in a session are made as the session owner. Commits use the owner's GitHub name and their <id>+<login>@users.noreply.github.com address, so GitHub attributes them even when your Inspect email isn't on your GitHub account.
  • Pushing branches and opening and updating pull requests use the session owner's linked GitHub account. Pull requests go through review like anyone else's.
  • Comments, replies, and reactions Inspect posts on pull requests come from the Inspect GitHub App.

Commit signing

Turn on Commit signing under Settings → Integrations → GitHub to have GitHub sign every commit Inspect pushes, so GitHub shows them as Verified. With it on, Inspect recreates each branch push through the GitHub API so GitHub signs it, whether or not the repository requires signed commits. Tag pushes and branch deletions are pushed normally. It is off by default and needs the Manage integrations role.

Mention @inspect on a pull request

Write @inspect followed by a request in a pull request comment, a review, or an inline review comment. Inspect works on the pull request's code and replies on GitHub.

  • Inspect reacts with 👀 and posts a One moment. ⏳ placeholder while it works. When the turn ends, the 👀 becomes 👍 if Inspect replied on GitHub, or 😕 if it didn't.
  • A review that mentions @inspect in several comments gets one reply in each thread.
  • Mentions inside code blocks or inline code are ignored. Mentions on issues that aren't pull requests are ignored.
  • The person who writes the mention must have linked their GitHub account to Inspect. The work runs with their Inspect access.
  • If you already have an open session for the pull request, the mention continues it. When the pull request's author writes the mention, Inspect continues the author's session. Otherwise it starts a new session for you.
  • Comments from Inspect itself never trigger it. A bot's mention is only handled when the pull request's author has a linked account.

After 20 GitHub mentions in one session, Inspect pauses them and shows GitHub @inspect messages paused in the session. Choose Re-enable GitHub messages to accept more.

For automatic responses to review comments and failing checks, see Code review. For automations that start from pushes, pull requests, and checks, see GitHub automations.

Troubleshooting