CostLensConnect GitHub
Connect GitHub
Connect a GitHub repository, with the CostLens GitHub App or a personal access token.
Updated November 20261 min read
Option 1: install the CostLens GitHub App (recommended)
No token to create or rotate.
- Go to Settings → Integrations → GitHub and click Install the GitHub App.
- GitHub asks which account and repositories to allow. Choose the organization, then Only select repositories or All repositories.
- You return to CostLens. Pick the repositories to connect and click Connect selected. Each becomes its own connection.
CostLens checks that you own the installation before attaching it, so an installation ID alone can never connect someone else's repositories.
To stop, use Disconnect on the installation in CostLens. That removes the connected repositories here; uninstall the App in GitHub (Settings → Applications) to revoke its access entirely. If the App is removed or suspended in GitHub, or a repository is removed from it, the matching connections pause automatically.
Option 2: personal access token
- Go to Settings → Integrations and click Connect on the GitHub card.
- Enter the repository as
owner/repo. - Paste a fine-grained personal access token scoped to that repository, then click Connect.
Permissions
| Permission | Why |
|---|---|
| Issues: write | Open alert issues and comments |
| Contents: write, Pull requests: write | Only needed for Infrastructure-as-Code Fixes |
| Commit statuses and Checks: write | Cost estimate status on pull requests |
| Metadata: read | Always required |
The GitHub App requests exactly these. For a token, Issues write is enough for alerts alone.
Test, edit and disconnect
- Test is read-only and confirms access without creating anything.
- Edit changes the repository or rotates the token.
- Disconnect removes the connection and its stored token. It does not delete issues CostLens already created.
See Git Integration for what is delivered and how failures are handled.