# pr-list ## Intent Shows the open pull requests for the selected repository and provides the **"Merge & clean up"** action (AGENT.md §8.4) — the feature that makes PRs usable for someone who otherwise finds them clutter: squash-merge and delete the branch in one click. The merge is DESTRUCTIVE (§1.4), so the button confirms first, naming the PR, base, and branch to be deleted. ## Public surface - **Tag:** `` - **Attributes/properties:** none. Hides itself (`hidden`) when no forge is configured or the repo isn't on the forge host. - **Listens:** `repo:select` on `document` — loads PRs for `event.detail.path`. - **Fetches:** `GET /api/repo/prs?path=…` (`{supported:false}` → hidden). - **Writes:** `POST /api/repo/pr/merge {path, number}` after a `confirm()`. ## History - 2026-09-20: created — slice 5 (forge); list open PRs + "Merge & clean up". ## Notes / gotchas - Requires `GITEA_URL` + `GITEA_TOKEN` on the server; otherwise the component stays hidden (graceful degradation). - Fork PRs are labelled; their branch lives in the fork, so cleanup only deletes branches in the same repo (the server enforces this too). - All server-derived text is escaped; the PR link opens in a new tab.