Skip to content

GitHub Integration Examples

Alessio Rocchi edited this page Jan 27, 2026 · 1 revision

GitHub Integration Examples

Practical examples for GitHub automation.


Create Issue from Code Review

const session = await memory.createSession({ type: 'code-review' });

// Review code
const reviewer = spawnAgent('reviewer', { sessionId: session.id });
// Reviewer finds issues...

// Create GitHub issue
{
  "tool": "github_issue_create",
  "arguments": {
    "owner": "myorg",
    "repo": "myrepo",
    "title": "Security issue in authentication",
    "body": "Found SQL injection vulnerability...",
    "labels": ["security", "bug"],
    "assignees": ["security-team"]
  }
}

Automated PR Creation

// After feature implementation
const coder = spawnAgent('coder');
// Coder implements feature...

// Create PR
{
  "tool": "github_pr_create",
  "arguments": {
    "owner": "myorg",
    "repo": "myrepo",
    "title": "Add user authentication",
    "head": "feature/user-auth",
    "base": "main",
    "body": "Implemented JWT-based authentication\n\n- JWT generation\n- Token validation\n- Refresh tokens"
  }
}

Track PRs in Session

const session = await memory.createSession({
  pr: 'PR-123',
  repository: 'myrepo'
});

// Get PR details
const pr = await github.getPR('myorg', 'myrepo', 123);

// Store in memory
await memory.store('pr:123:details', JSON.stringify(pr), {
  namespace: `session:${session.id}`
});

Related:

Clone this wiki locally