Overview
OpenSRE connects to GitHub so the agent can work with issues, pull requests, repositories, Actions, and code — and correlate recent commits with incidents. Once GitHub is connected, the interactive-shell action agent usesgithub_cli (authenticated gh) for flexible reads and writes — create/list/view issues and PRs, assign, label, comment, merge, search, releases, workflow runs, and gh api — without a separate approval gate. Prefer this over shell gh / !gh. These requests stay on the action path (not the conversational gather/answer loop).
Prerequisites
- GitHub account with repository access
- One of: browser sign-in (recommended), a personal access token, or GitHub Copilot MCP access
- For chat
github_cli: theghbinary onPATH(OpenSRE supplies the token). Homebrew installs of OpenSRE pullghvia formula dependency; the curl installer soft-installs it when missing.
Setup
Option 1: Interactive CLI (browser sign-in)
OPENSRE_GITHUB_OAUTH_CLIENT_ID if you register your own app.
If you prefer, the same prompt lets you paste a token (PAT) instead.
Option 2: Environment variables
Option 3: Persistent store
Credentials
Creating a personal access token
- In GitHub, go to Settings → Developer settings → Personal access tokens → Tokens (classic)
- Click Generate new token
- Select the following scopes:
repo,read:org(add write scopes if you want chat mutations viagithub_cli) - Copy the token
For GitHub Enterprise Server, set
GITHUB_MCP_URL to your enterprise MCP endpoint.Transport modes
Investigation tools
Verify
/integrations verify github or /verify github. Alias: github_mcp.
Troubleshooting
Security
- Prefer the least privilege that matches how you use OpenSRE (read-only for investigation-only; write scopes if you want chat to create/edit issues and PRs).
- Limit token scope to the repositories OpenSRE needs.
- Store the token in
.env, not in source code.