Docs / GitHub Integration

GitHub Integration

Included in Pro

Connect Pyckle to GitHub to index issues and PRs in real-time, and get automated code review comments on every pull request.

Part 1: Issue & PR Indexing via Webhooks

Set up a webhook so every issue and PR is indexed as it opens, edits, or closes.

1

Get your webhook URL

Your Pyckle webhook URL uses your API key as the path segment:

https://pyckle.co/webhooks/github/YOUR_API_KEY/issues
2

Add the webhook in GitHub

Go to your repo → Settings → Webhooks → Add webhook:

  • Payload URL: your webhook URL from step 1
  • Content type: application/json
  • Secret: generate a random string and save it (you'll need it below)
  • Events: select "Issues" and "Pull requests"
3

Set GITHUB_WEBHOOK_SECRET on Fly

fly secrets set -a pyckle GITHUB_WEBHOOK_SECRET=
4

Verify it works

Open or edit an issue in your repo. Then search for it:

search_code("auth bug reported issue")

Part 2: Automated PR Review via GitHub Actions

Add one workflow file and every PR gets a context-aware Pyckle review comment automatically.

1

Add the workflow file

Create .github/workflows/pyckle-review.yml in your repo:

name: pyckle-review on: pull_request: types: [opened, synchronize] jobs: review: runs-on: ubuntu-latest permissions: pull-requests: write contents: read steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Run pyckle diff review env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYCKLE_MCP_URL: ${{ secrets.PYCKLE_MCP_URL }} run: | pip install httpx --quiet python3 - <<'EOF' import httpx, os, json, subprocess, sys pyckle_url = os.environ.get("PYCKLE_MCP_URL", "") if not pyckle_url: print("PYCKLE_MCP_URL not set — skipping", file=sys.stderr) sys.exit(0) diff = subprocess.check_output( ["git", "diff", "origin/main...HEAD"], stderr=subprocess.DEVNULL, ).decode(errors="replace") if not diff.strip(): sys.exit(0) try: resp = httpx.post( f"{pyckle_url}/tools/review_diff", json={"diff": diff}, timeout=60, ) resp.raise_for_status() comment = resp.json().get("pr_comment", "pyckle review completed.") except Exception as e: print(f"pyckle review failed: {e}", file=sys.stderr) sys.exit(0) ref = os.environ.get("GITHUB_REF", "") pr_number = ref.split("/")[2] if ref.count("/") >= 2 else "" repo = os.environ.get("GITHUB_REPOSITORY", "") if pr_number and repo: httpx.post( f"https://api.github.com/repos/{repo}/issues/{pr_number}/comments", headers={"Authorization": f"Bearer {os.environ['GITHUB_TOKEN']}"}, json={"body": comment}, timeout=30, ) EOF
2

Add PYCKLE_MCP_URL secret

Go to repo Settings → Secrets → Actions → New repository secret:

  • Name: PYCKLE_MCP_URL
  • Value: https://pyckle.co (or your self-hosted URL)
3

Open a PR and watch it work

Within 60 seconds of opening a PR, Pyckle posts a review comment with severity scoring (🔴 HIGH / 🟡 MEDIUM / 🟢 LOW) and a list of findings. The workflow never blocks your pipeline — errors exit 0.

Troubleshooting

Webhook shows 401 Unauthorized

Your API key in the webhook URL doesn't match a valid Pro key. Check your key at dashboard.

Webhook shows 403 Invalid signature

The GITHUB_WEBHOOK_SECRET on Fly doesn't match the secret you set in GitHub. Re-run fly secrets set with the correct value.

PR review comment doesn't appear

Check the Actions tab in your repo for workflow logs. Ensure PYCKLE_MCP_URL secret is set and the workflow has pull-requests: write permission.