feat: pr list/approve/merge verbs + mass approve/merge skills#12
Conversation
PR Summary by QodoAdd Description
Diagram
High-Level Assessment
Files changed (13)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
10 rules 1. Merge success misreported
|
Add a `pr` noun to ghafi with three verbs: - `pr list <org>` — read-only PR discovery (org-wide Search API or one --repo), client-side title filter with --match exact|prefix|substring. - `pr approve <owner>/<repo> <n>` — approving review; dry-run default, --apply commits. Self-authored PRs (422) map to a clear error. - `pr merge <owner>/<repo> <n>` — direct merge endpoint (squash default), dry-run default; clears non-required failing checks (e.g. lint). A conflict / required-check block maps to a clear "not mergeable" error. Two skills compose list + write into bulk actions, dry-run-then-apply, tallying done / skipped / failed (both resumable via the open match set): - mass-approve-prs — bulk approve every open PR matching a title heading. - mass-merge-prs — bulk merge (default squash) the same. Wired into learn / explain / MUTATING_VERBS; CLAUDE.md + CHANGELOG updated; version bumped 0.1.0 -> 0.2.0. 74 tests pass. - Claude Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…detic Rebased onto main (0.2.0, the eidetic-memory vendoring) and bumped to 0.3.0. Qodo review (PR #12, comment 3461789302 + summary findings): - pr merge: treat a `merged != true` response body as a failure (exit 4 with the API message) instead of a phantom success — stops mass-merge over-count. - pr list: escape embedded `"`/`\` in --title before the in:title qualifier. - pr approve / pr merge: reject malformed owner/repo (empty part / >1 slash). - (pushback) the `gh auth token` bridge + `..` repo-root walk in the skill scripts match the gh-bridge documented in CLAUDE.md and the existing bootstrap-sibling skill; this exact suggestion was rejected in PR #3. Eidetic store relocation (resolves the portability-lint `~/.eidetic` refs that were red on main): - remember/recall wrappers default EIDETIC_DATA_DIR to <main-worktree>/.eidetic, rooted at git's common dir so linked worktrees (the colleague backend) still share one store — repo-local memory without losing cross-agent recall. - Updated both SKILL.md docs; .gitignore the `.eidetic/` data dir; fixed a pre-existing MD040 in recall/SKILL.md. 77 tests pass; black/isort/flake8/bandit/markdownlint/portability all clean. - Claude Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
8c37b49 to
71c227b
Compare
|
Thanks Qodo — triaged all four findings. Pushed Bug 1 — merge success misreported → FIXED. Bug 2 — unescaped title in search → FIXED. Bug 3 — malformed owner/repo accepted → FIXED. Rule violation 4 —
|
Thanks — that sounds consistent and well-triaged.
If you want, I can also help sanity-check the new |
What
Adds a
prnoun to ghafi and two bulk-action skills, so ghafi (notgh) owns the find→approve/merge loop across an org.Verbs (all writes dry-run by default;
--applycommits)ghafi pr list <org>— read-only PR discovery. Org-wide via the Search API (/search/issues, paginated to the 1000 cap) or one--repovia/repos/{owner}/{repo}/pulls, then a client-side--match exact|prefix|substring(case-insensitive) re-check to kill the Search API's fuzzy false positives.--state open|closed|all,--json.ghafi pr approve <owner>/<repo> <n>— POST a review withevent=APPROVE. Self-authored PRs (GitHub 422) map to a clear "your own pull request" error so a batch can skip and continue.ghafi pr merge <owner>/<repo> <n>—PUT .../merge,--method squash|merge|rebase(default squash). Same path asgh pr merge --admin: clears non-required failing checks (e.g. a non-blockinglint). A merge conflict or a required-check / admin-locked branch-protection block maps to a clear "not mergeable" error (HTTP 405).Skills (discover with
pr list, act per match; dry-run-then-apply; resumable)mass-approve-prs— bulk approve every open PR matching a title heading; tallies approved / skipped (self-authored) / failed.mass-merge-prs— bulk merge (default squash) the same; tallies merged / blocked (conflict / required check) / failed.Safety
tests/test_mutation_safety.pyMUTATING_VERBSnow includespr approveandpr merge, each with a dry-run-no-write behavioral test.learn/explain(pr,pr list,pr approve,pr merge); CLAUDE.md (project shape, scopes, mass-action flows) and CHANGELOG updated.0.1.0 → 0.2.0.Test
uv run pytest -n auto→ 74 passed.black/isort/flake8/bandit/markdownlint/ portability lint / doc-test-align all clean.Provenance
These verbs were used to land the org-wide "Add eidetic remember/recall memory skills" rollout: 52 of 53 PRs squash-merged via
mass-merge-prs; the lone holdout (colleague#243) is a real merge conflict, not a check block.