Skip to Content
DocsGuidesGitHub Integration

Aigon integrates with GitHub pull requests so that feature-close is aware of PR state, and the dashboard shows PR status on feature cards. This is entirely optional — if you don’t create a PR, Aigon closes features locally as it always has.

Prerequisites

  • Your repo origin points to GitHub
  • gh CLI is installed
  • gh auth status succeeds for the account that owns the repo access

If these are missing, the PR gate silently falls back to local close, and the dashboard shows status as unavailable.

PR-aware close gate

When you run feature-close on a repo with a GitHub origin and the gh CLI installed, Aigon automatically checks for a PR on the feature branch:

PR stateWhat Aigon does
No PR existsNormal local close (merge branch, clean up)
PR is openBlocks close with a message — merge or close the PR first
PR is draftBlocks close — publish or close the draft first
PR is mergedSyncs local main from origin and finishes the close

No configuration is required. The gate activates automatically when all three conditions are met:

  1. Your repo’s origin remote points to GitHub
  2. The gh CLI is installed and authenticated
  3. A PR exists for the feature branch targeting your default branch

1. Implement the feature

Use any Aigon mode (Drive, Fleet, Autopilot) to build the feature as normal.

2. Push the branch

From the dashboard, click Push in the feature card overflow menu (⋯). Or from the CLI:

aigon feature-push # auto-detects from worktree branch aigon feature-push 07 # explicit ID from main repo

3. Create a pull request

Create the PR on GitHub — through the web UI, gh pr create, or however you prefer. Aigon does not create PRs for you.

4. Check PR status on the dashboard

After an agent submits, the feature card shows a GitHub section. Click Check PR status to fetch the current state.

GitHub PR status section on a feature card showing a merged PR

The status badge links directly to the PR on GitHub. After the first fetch, use the refresh button (↻) to update.

5. Close the feature

aigon feature-close 07

If the PR is merged, Aigon syncs your local main branch from origin and completes the close. If the PR is still open, Aigon blocks and tells you what to do.

Dashboard status reference

StatusWhat it meansWhat to do
No PRNo pull request was found for the feature branch.Create a PR if you want remote review, or continue with local close workflow.
OpenA PR exists and is open.Continue review and merge in GitHub before running feature-close.
DraftA PR exists but is still draft.Mark ready for review or close it if no longer needed.
MergedThe PR was merged on GitHub.Run feature-close to finalize local state and cleanup.
UnavailableCould not determine status (missing auth, non-GitHub remote, or CLI issue).Verify gh install/auth and remote setup, then refresh again.

Close button warning

If a PR is not merged yet, the feature card can show an orange close-state warning. This indicates remote review is still in progress. The close action remains visible so you can retry after a refresh, but feature-close may block until the PR is merged or closed.

Without PRs

If you never push or create a PR, nothing changes. feature-close works exactly as before — local merge, cleanup, done. The PR gate only activates when it detects a PR exists for your branch.

Limitations

  • Manual refresh only (no automatic polling)
  • Only GitHub is supported (GitLab, Bitbucket are not checked)
  • Aigon does not create PRs — you do that yourself
  • If gh auth fails, the gate silently degrades to local close
  • Read-only status visibility (Aigon does not edit PRs)
Last updated on