Skip to main content

GitHub Tracker Plugin

The GitHub tracker plugin integrates with GitHub Issues, allowing Agent Orchestrator to manage tasks, track progress, and update issue state as agents work.

Overview

This plugin uses the GitHub CLI (gh) to interact with the GitHub Issues API. It provides full CRUD operations for issues and generates context-aware prompts for agents based on issue content.
The GitHub tracker plugin requires the GitHub CLI (gh) to be installed and authenticated.

Configuration

Configure the GitHub tracker plugin in your agent-orchestrator.yaml:

Configuration Options

The GitHub tracker plugin requires no additional configuration parameters. All settings are derived from the project’s repo field.
string
required
GitHub repository in owner/repo format (e.g., octocat/hello-world).This is used for all GitHub API operations.

Requirements

Prerequisites:
  • GitHub CLI (gh) installed and in PATH
  • Authenticated with gh auth login
  • Read/write access to issues in the target repository

Installing GitHub CLI

Verifying Authentication

Features

Issue Operations

Get Issue Fetch a single issue by number:
List Issues List issues with filters:
Create Issue Create a new issue:
Update Issue Update issue state, labels, or add comments:
State updates: GitHub Issues only supports open and closed states. Setting in_progress is a no-op (GitHub doesn’t have this state).

Issue State Mapping

GitHub Issue State → Tracker State:

Prompt Generation

The plugin generates context-aware prompts for agents:
Example output:

Branch Naming

The plugin generates branch names from issue numbers:

Issue URLs and Labels

Usage Example

Start Agent on Issue

Auto-Update on PR Merge

When a PR is merged, the orchestrator will automatically close the associated issue.

Troubleshooting

The GitHub CLI is not installed or not in PATH.Solution:
The GitHub CLI is not authenticated.Solution:
The repo field must be in owner/repo format.Example:
The authenticated GitHub account doesn’t have access to the repository or issues.Solutions:
  • Verify repository access: gh repo view owner/repo-name
  • Check issue permissions (requires write access for updates)
  • Re-authenticate: gh auth login --force
GitHub API requests have a 30-second timeout.Solutions:
  • Check network connectivity
  • Verify GitHub API status: https://www.githubstatus.com/
  • Increase timeout in plugin code if needed (requires source modification)
GitHub uses numeric issue numbers (e.g., 123), not alphanumeric identifiers.The plugin accepts:
  • "123" - Issue number as string
  • "#123" - With hash prefix (stripped automatically)
Invalid:
  • "ABC-123" - Not a GitHub issue format (use Linear for this)

API Reference

Tracker Interface Methods

getIssue(identifier, project)
  • Fetches issue details by number
  • Returns: Issue object with all fields
isCompleted(identifier, project)
  • Checks if issue is closed
  • Returns: boolean
issueUrl(identifier, project)
  • Generates GitHub issue URL
  • Returns: string
issueLabel(url, project)
  • Extracts issue number from URL
  • Returns: string (e.g., "#123")
branchName(identifier, project)
  • Generates branch name from issue number
  • Returns: string (e.g., "feat/issue-123")
generatePrompt(identifier, project)
  • Creates context prompt for agent
  • Returns: string (formatted prompt)
listIssues(filters, project)
  • Lists issues with optional filters
  • Returns: Issue[]
updateIssue(identifier, update, project)
  • Updates issue state/labels/assignee/comments
  • Returns: void
createIssue(input, project)
  • Creates a new issue
  • Returns: Issue (created issue)

Advanced Usage

Issue Filters

Label Management

Labels are additive: using updateIssue with labels adds them to existing labels, it doesn’t replace them.

Comment Workflow

Integration with Other Plugins

With SCM Plugin

The tracker and SCM plugins work together for full issue-to-PR workflow:
  1. Tracker generates prompt from issue
  2. Agent writes code
  3. SCM creates PR and links it to the issue
  4. Reactions auto-close issue when PR merges

With Workspace Plugin

The tracker provides the branch name for workspace creation:

Security Considerations

  • All GitHub API calls are made through the gh CLI (no direct token handling)
  • Commands are executed with execFile (not exec) to prevent shell injection
  • 30-second timeout prevents hanging on network issues
  • Repository format is validated before use

Source Code

Source: packages/plugins/tracker-github/src/index.ts