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:
- Push branch to origin
- Create PR via GitHub CLI
- Link to task (Linear issue or Notion page)
- 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 featuresfix- Bug fixesrefactor- Code refactoringdocs- Documentationtest- 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:
- Required reviews: PRs will wait for review
- Required checks: CI must pass
- 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):
- Claudear checks PR status
- If all checks pass, merges via
gh pr merge - Cleans up worktree and branch
- 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:
- Close the PR
- Update Claudear config
- Retry the task
CI Failures
If CI fails on the PR:
- Review the failure
- Add a comment on the task (Linear issue or Notion page)
- Claude will see your feedback and fix