From febeb679bd34e83edf05c6ffa60d528cbeb148a3 Mon Sep 17 00:00:00 2001 From: Corvid Agent <0xopenbytes@gmail.com> Date: Thu, 21 May 2026 15:59:01 -0700 Subject: [PATCH] feat(v0.6.0): write ops + diff/comments view flags + repo file reader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make the plugin genuinely useful for agents driving real GitHub work, not just read-only summaries. Closes the gap where Merlin agents kept falling back to authenticated-failing `web-fetch` calls because the plugin couldn't surface diffs, comments, or file contents at a ref. prs: - `view` gets --diff and --comments append flags. - `comment -b BODY` posts a PR comment. - `review --approve | --request-changes | --comment-review` submits a review (--body required for the latter two). - `merge ` with --squash (default) | --merge | --rebase. - `close ` and `reopen `. issues: - `view` gets a --comments flag. - `comment -b BODY`, `close `, `reopen `. repo (new subcommand): - `view [-R OWNER/NAME] [--json]` — repo metadata. - `file [-R OWNER/NAME] [-r REF] [--json]` — read a file's contents at any ref. Wraps `gh api repos/.../contents/...` and decodes the base64, so it works for private repos and arbitrary refs without needing a clone or a raw-URL token. Router and plugin.toml description updated; README + CHANGELOG follow. Bash strict-mode safe (empty-array expansion uses scalars), shellcheck clean at --severity=warning. --- CHANGELOG.md | 16 ++++ README.md | 51 ++++++++---- bin/fledge-github | 7 +- bin/fledge-github-issues | 78 ++++++++++++++---- bin/fledge-github-prs | 166 +++++++++++++++++++++++++++++++++------ bin/fledge-github-repo | 128 ++++++++++++++++++++++++++++++ plugin.toml | 8 +- 7 files changed, 392 insertions(+), 62 deletions(-) create mode 100755 bin/fledge-github-repo diff --git a/CHANGELOG.md b/CHANGELOG.md index c844281..ef124ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## [v0.6.0] - 2026-05-21 + +### Features + +- `prs view`: add `--diff` and `--comments` flags to append the unified diff and conversation comments + reviews to the view output. +- `prs comment -b BODY`: post a comment on a pull request. +- `prs review `: submit a review — one of `--approve`, `--request-changes`, or `--comment-review`, plus `--body`. +- `prs merge `: merge a PR with `--squash` (default), `--merge`, or `--rebase`. +- `prs close ` / `prs reopen `: close without merging or reopen. +- `issues view`: add `--comments` flag to append the issue conversation. +- `issues comment -b BODY`: post a comment on an issue. +- `issues close ` / `issues reopen `. +- New `repo` subcommand: + - `repo view [-R OWNER/NAME] [--json]` — repo metadata. + - `repo file [-R OWNER/NAME] [-r REF] [--json]` — read a file's contents at any ref via `gh api repos/.../contents/...`. Closes the gap where agents fell back to authenticated-failing `web-fetch` against `raw.githubusercontent.com`. + ## [v0.5.0] - 2026-05-13 ### Features diff --git a/README.md b/README.md index 18228f8..1ea8fb8 100644 --- a/README.md +++ b/README.md @@ -37,38 +37,61 @@ $ fledge github checks JSON output is the raw GitHub API response from `repos/{owner}/{repo}/commits/{branch}/check-runs`. -### `fledge github issues [list | view | create] [OPTIONS]` +### `fledge github issues [list | view | create | comment | close | reopen ] [OPTIONS]` -Browse and create issues. Lists by default; `view ` shows a specific one; `create` opens a new issue. +Browse, create, and write to issues. Lists by default. ``` $ fledge github issues --state all --limit 5 -$ fledge github issues view 42 --json +$ fledge github issues view 42 --comments $ fledge github issues create --title "Bug: something broke" -$ fledge github issues create --title "Feature request" --label enhancement --assignee octocat --json +$ fledge github issues comment 42 -b "Reproduced on 0.3.1." +$ fledge github issues close 42 +$ fledge github issues reopen 42 ``` -List/view options: `--state {open,closed,all}`, `--limit `, `--label