Integrations•8 min read

GitHub Integration Setup Guide

Connect your GitHub repositories and organizations to Valstorm so your team and AI agents can browse code, inspect branches and commits, create and review Pull Requests, manage Issues, and monitor GitHub Actions workflows.


Before You Start

  • For Organization Setup (Steps 1–3):
    • You need a GitHub account with access to the repositories you want to connect (and Org Owner approval if your GitHub Organization requires approval for Fine-Grained Personal Access Tokens).
    • You must be a Valstorm Account Admin or a delegated GitHub Organization Manager in Valstorm.
  • For Personal Developer Setup (Step 4):
    • Any Valstorm team member with a GitHub account can connect their own personal GitHub account under User Scope.

How Valstorm Access & Sharing Works

  • Organization Scope: You can save multiple labeled tokens (for example, a Read-Only token for analysts/support and a Read & Write token for engineers). Every token is private to the person who added it until you share it with specific Users or User Groups under Shared With.
  • Personal User Scope: Individual developers can also sign in with their own GitHub account via 1-click OAuth so actions run under their own GitHub identity.

Step 1: Generate a GitHub Fine-Grained Personal Access Token

Valstorm recommends Fine-Grained Personal Access Tokens (github_pat_...) because they let you restrict access to specific repositories and exact Read vs. Write permissions.

  1. Log in to GitHub, click your profile avatar in the top-right corner, and select Settings.
  2. In the left sidebar, scroll down and click Developer settings.
  3. Expand Personal access tokens → click Fine-grained tokens → click Generate new token.
  4. Fill in the token details (in order):
    • Token name: e.g., Valstorm Read-Only or Valstorm Engineering
    • Resource owner: Select your GitHub Organization (not your personal account, unless you intentionally want personal repos).
    • Expiration: Choose an expiration period (GitHub caps fine-grained tokens at up to 1 year).

      Expiration Reminder: Set a calendar reminder to generate and update your token before it expires so your Valstorm integration doesn't lose access.

    • Repository access: Choose Only select repositories (recommended) and pick the exact repositories you want this token to access.

      Private Repository Warning: If your organization has any private repositories that teammates using this Valstorm token should not have access to, do not choose "All repositories" — select Only select repositories and explicitly pick only the approved repos. Selecting only the specific repositories you need is strongly recommended best practice regardless.

  5. Under Permissions → Repository permissions, enable the scopes you want this token to have:
Repository PermissionRead-Only (Browse & Monitor)Read and Write (Create & Manage)
MetadataRead-only (required by GitHub)Read-only (required by GitHub)
ContentsView files, branches, and commitsCreate/delete branches, edit files, and push commits
Pull requestsList PRs, diffs, commits, and reviewsOpen, update, review, and merge PRs
IssuesRead issues and commentsCreate, update, and comment on issues
ActionsInspect workflow runs and job logsTrigger and re-run GitHub Actions workflows
  1. Click Generate token and copy the token immediately (starts with github_pat_...) — GitHub will only display it once.

Org Admin Approval Note: If your GitHub Organization enforces fine-grained token approval, your token will remain inactive until a GitHub Organization Owner approves it under Organization Settings → Personal access tokens → Pending requests.

Security & Account Best Practices (Personal Repos & Service Accounts):

  • Fine-Grained PATs (github_pat_...): When Resource owner is set to your GitHub Organization, GitHub restricts that token exclusively to the selected organization repositories — your personal repositories are NOT exposed. However, the token is still tied to the GitHub user who created it (if that person leaves the company, the token stops working). For long-term reliability, consider creating Organization tokens from a dedicated company/service GitHub account with no personal repositories.
  • Classic PATs (ghp_...) Warning: Valstorm also accepts Classic Personal Access Tokens (ghp_..., with repo and optional workflow scopes), but Classic tokens cannot be restricted to a single organization or repo list. Saving a personal Classic PAT at the Organization level will expose all of your private personal repositories (and other organizations you belong to) to anyone it is shared with. If you use a Classic token for an Organization connection, always generate it from a dedicated organization/service GitHub account with no personal repositories.

Step 2: Save the Token in Valstorm (Organization Scope)

  1. In Valstorm, open Command Center → Integrations → Organization Scope.
  2. Click GitHub.
  3. Click Add New Token.
  4. Fill in the form:
    • Token Label: Give the token a clear name describing its access level (e.g., Monorepo Read-Only or Engineering PR & CI Automation).
    • GitHub Fine-Grained or Classic Token: Paste your github_pat_... (or ghp_...) token.
  5. Click Save Token.

Valstorm encrypts your token and automatically detects your GitHub organization, accessible repositories, and Read/Write capabilities.

Public Repositories Note: GitHub always allows read-only visibility into public repositories belonging to your organization, so public org repos may also appear in the associated repositories list alongside your selected private repo(s). Write actions remain strictly limited by GitHub to the repositories you explicitly selected on your Fine-Grained token.


Step 3: Verify & Share With Your Team

  1. On your newly saved token card, click Verify to confirm the connection is active and review the discovered repositories and permissions.
  2. To grant teammates access, click Edit (or Share) on the token card and add Users or User Groups under Shared With.
  3. Click Save.

Tip — Separate Read-Only and Read/Write Access: Add a Read-Only token for broader team visibility (Product, Support, Leadership) and a separate Read & Write token shared only with Engineering.


Step 4: Connect Your Personal GitHub Account (User Scope — Optional)

Any team member who wants Valstorm actions (such as opening PRs, posting review comments, or creating issues) to run under their own personal GitHub identity can connect via 1-click OAuth:

  1. In Valstorm, open Command Center → Integrations → User Scope.
  2. Click GitHub.
  3. Click Connect GitHub and authorize Valstorm in the GitHub popup window.
  4. Once redirected back, your personal GitHub handle (@username) will appear as Connected.

Important Note When Using Both Scopes Under the Same GitHub Account: Authorizing your personal GitHub account under User Scope after setting up an Organization fine-grained token from that same GitHub account can interfere with or invalidate the active fine-grained token. To avoid conflicts:

  • Best practice: Generate Organization tokens from a dedicated org/service GitHub account (with no personal repos), and only use your personal GitHub account for User Scope.
  • If you do connect both using the same GitHub account and your Organization token stops working, open Integrations → Organization Scope → GitHub, click Verify, or re-save/regenerate the Organization token.

Troubleshooting

IssueWhat to Check
Token returns 401 UnauthorizedThe token may have expired or been revoked in GitHub. Generate a new Fine-Grained PAT in GitHub and update the token in Valstorm.
Org fine-grained token became invalid after connecting Personal User ScopeAuthorizing a personal GitHub account under User Scope after creating an Org fine-grained token on the same GitHub account can void or override the token. Use a dedicated org/service GitHub account for Organization tokens, or re-verify / re-save the Organization token in Organization Scope.
Token saved, but 403 Forbidden or 0 repositories foundConfirm you selected your GitHub Organization as the Resource owner and selected the target repositories. If your org requires token approval, ask a GitHub Org Owner to approve it under Organization Settings → Personal access tokens → Pending requests.
Can read repos, but cannot open PRs or trigger workflowsCheck the token's Repository permissions in GitHub — Pull requests, Issues, Contents, or Actions must be set to Read and write for write operations.
Teammates cannot see GitHub repositories in ValstormOpen the token card under Organization Scope → GitHub, add the users or user groups under Shared With, and save.
Personal repos showed up in an Org connectionMake sure you used a Fine-Grained PAT scoped to your GitHub Organization as Resource owner (not a personal Classic PAT). If using a Classic PAT, switch to a dedicated org/service GitHub account with no personal repos.