Docs/GitHub Integration

GitHub Integration

How Claudear creates and manages pull requests

GitHub Integration

Claudear automatically creates pull requests when Claude completes a task, regardless of whether the task came from Linear or Notion. This guide explains how PR creation works.

How PRs Are Created

When Claude outputs TASK_COMPLETE:

  1. Push branch to origin
  2. Create PR via GitHub CLI
  3. Link to task (Linear issue or Notion page)
  4. Update status to "In Review"

PR Format

Title

Linear:

feat(ENG-123): Add user authentication

Notion:

feat(N-ABC123-001): Add user authentication

Format: {type}({identifier}): {task title}

Types are inferred from the issue:

  • feat - New features
  • fix - Bug fixes
  • refactor - Code refactoring
  • docs - Documentation
  • test - Test additions

Body

## Summary
Implements user authentication for the API.

## Task
Closes ENG-123  (or links to Notion page)

## Changes
- Added JWT token generation
- Created login/logout endpoints
- Added password hashing

---
Generated by Claudear

GitHub CLI Authentication

Claudear uses gh for PR creation. Ensure it's authenticated:

gh auth status

If not authenticated:

gh auth login

Select:

  • GitHub.com
  • HTTPS
  • Authenticate with browser

Repository Setup

Remote Configuration

Your repo needs an origin remote:

git remote -v
# origin  git@github.com:user/repo.git (fetch)
# origin  git@github.com:user/repo.git (push)

Branch Protection

If your main branch has protection rules:

  1. Required reviews: PRs will wait for review
  2. Required checks: CI must pass
  3. No force push: Already compatible

Claudear respects all branch protection rules.

Customization

Base Branch

By default, PRs target main. Claudear uses your repository's default branch.

PR Template

Claudear uses a built-in template that includes:

  • Summary of changes
  • Link to the originating task
  • List of commits included

Auto-Merge

When you move a task to "Done" (Linear or Notion):

  1. Claudear checks PR status
  2. If all checks pass, merges via gh pr merge
  3. Cleans up worktree and branch
  4. Updates task status to show "✅ Merged"

Merge Strategy

Default: Squash merge

gh pr merge --squash

This keeps your main branch history clean.

Troubleshooting

PR Creation Fails

Check GitHub CLI:

gh auth status

Check remote access:

git push origin HEAD --dry-run

Check permissions:

  • You need write access to the repo
  • GitHub CLI needs repo scope

Wrong Base Branch

If PR targets wrong branch:

  1. Close the PR
  2. Update Claudear config
  3. Retry the task

CI Failures

If CI fails on the PR:

  1. Review the failure
  2. Add a comment on the task (Linear issue or Notion page)
  3. Claude will see your feedback and fix