$cd ../integrations/
⚑ Productivityv1.4+
$ cat github-integration.md

openclaw.integrate('github')

/** Your AI teammate that never skips a PR review, works nights and weekends */

πŸ”
Automated PR Reviews

// OpenClaw acts as an automated reviewer. It analyzes diffs, detects logical flaws, enforces coding standards, and provides constructive feedback right in your Pull Requests.

🏷️
Smart Issue Triage

// No more unorganized backlogs. New issues are instantly analyzed, categorized (bug, enhancement, question), and assigned priority scores based on natural language context.

πŸ“‹
Release & Changelog Gen

// Stop writing changelogs by hand. OpenClaw scans merged PRs and commit histories between version tags to draft human-readable, executive-ready release notes.

πŸ“Š
Daily Pulse Digest

// A morning Telegram/Slack message summarizing the health of your repository: merged PRs, open high-priority issues, and blocked workflows from the last 24 hours.

setup.md

βš™οΈ Setup & Configuration Setup

1.
1. Create a GitHub Fine-Grained Personal Access Token (PAT)
Go to github.com/settings/tokens. Create a new fine-grained token scoped to your target repositories. Grant permissions: Contents (Read), Pull requests (Read & Write), Issues (Read & Write).
2.
2. Configure the GitHub Webhook
In your repository Settings β†’ Webhooks, add a new webhook pointing to your OpenClaw server (e.g., https://your-domain.com/api/github/webhook). Subscribe to 'Pull requests' and 'Issues' events.
3.
3. Enable in OpenClaw Config
Update your openclaw/config.yaml with the generated token and enable the desired workflow automations.
# openclaw/config.yaml
integrations:
github:
enabled: true
token: "github_pat_YOUR_TOKEN"
auto_label_issues: true
review_prs: true
daily_digest: "09:00"
pr_review_example.log

πŸ” PR Review in Action

GitHub Comment (PR #142)
@openclaw please review
OpenClaw replied
## PR Review: Add Notion Integration **Summary**: Adds Notion API client, config parser, and 3 skill commands. **βœ… Looks good:** - Error handling for expired tokens - Rate limiting implemented correctly **⚠️ Suggestions:** - Line 47: API token logged in debug mode (security risk) - Line 89: Missing type for `database_id` β€” should be `string` Overall: **LGTM with minor fixes** 🟑
cicd_workflow.yml

πŸ”„ Advanced Workflow & CI/CD Example

// You can integrate OpenClaw directly into GitHub Actions for CI pipeline blocking.

name: OpenClaw PR Check
on:
  pull_request:
    types: [opened, synchronize, reopened]

jobs:
  ai-review:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
      - name: Trigger OpenClaw Analysis
        run: |
          curl -X POST https://your-domain.com/api/github/trigger-review \
          -H "Authorization: Bearer ${{ secrets.OPENCLAW_CI_TOKEN }}" \
          -d '{"pr_number": ${{ github.event.pull_request.number }}}'
troubleshoot.log

πŸ”§ Common Issues & Fixes

Q: OpenClaw isn't commenting on my PRs
A: Check if the Webhook payload is being received in the OpenClaw logs. Ensure your Personal Access Token hasn't expired and has 'Pull request: write' permissions.
Q: Rate limit exceeded errors from GitHub API
A: If your repository is extremely active, you might hit the GitHub API limit (5000 req/hr). We recommend configuring a caching layer or limiting OpenClaw to specific PR labels (e.g., 'needs-ai-review').

❓ FAQ

Q1. What permissions does it need?

A Personal Access Token with 'repo' scope for private repos, or just 'public_repo' for open source work.

Q2. Can it create PRs?

Yes. Ask OpenClaw to create a branch, make changes, and open a PR β€” all from natural language.

Q3. Does it work with GitHub Enterprise?

Yes. Configure the API base URL in config.yaml to point to your GitHub Enterprise instance.
← Back to Integrations