> ## Documentation Index
> Fetch the complete documentation index at: https://docs.duckbrain.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub issues/PRs (gitcrawl)

> GitHub issue & PR discussion → DuckBrain ingest (Available)

**Status:** Available

Full GitHub **issue and pull-request discussion** — thread titles + bodies, and (optionally) every comment — via **[gitcrawl](https://github.com/openclaw/gitcrawl)**, a local-first crawler that fetches from the GitHub API into a local SQLite database. DuckBrain attaches that database read-only and maps it to bronze, same pattern as Slack.

```bash theme={null}
brew install openclaw/tap/gitcrawl        # or pick "GitHub (issues/PRs)" in `duckbrain init`
gitcrawl init
gitcrawl sync owner/repo --include-comments   # per repo — repeat for each you want
duckbrain sync git
duckbrain search "flaky test" --source git --in "owner/repo"
```

## Per-repo, manual refresh

gitcrawl crawls **one repo at a time** (`gitcrawl sync owner/repo`) and has no sync-all, so DuckBrain doesn't auto-refresh it — you crawl the repos you care about, then `duckbrain sync git` ingests whatever's in the archive. `gitcrawl sync` fetches **open** issues + PRs by default; add `--state all` to backfill closed ones, and `--include-comments` to pull the comment threads (without it, only titles + bodies land).

## What gets ingested

* **Two record shapes.** One bronze row per **thread** (issue or PR: `title` + `body`) and one per **comment** (joined to its thread for context). Both upsert in place on edit.
* **Bot & deleted comments are dropped** — CI/dependabot noise and tombstoned comments never reach the brain.
* **Classification tracks repo privacy** — threads from a **public** repo are `classification: public`; anything from a **private** repo (or a repo whose visibility can't be read) stays `confidential`, so a private thread never leaks.

## Facet mapping

| Facet            | Value                                                                  |
| ---------------- | ---------------------------------------------------------------------- |
| `--source`       | `git` (alias `gitcrawl`)                                               |
| `--in`           | the repo — `owner/repo`                                                |
| title            | `issue #123: …` / `PR #45: …` (the comment carries its thread's label) |
| observer         | `github:<login>` — who authored the thread or comment                  |
| platform\_source | `github`                                                               |

<Note>
  Distinct from **[GitHub via Pipedream](/sources/github)**, which pulls issue *titles* + commit messages + repo READMEs through managed OAuth. gitcrawl is the one that gets the full issue/PR *discussion*, local-first.
</Note>
