Bug
fledge github prs create --json cannot succeed in v0.4.0.
Evidence:
-
The built-in help advertises the flag combination — fledge github prs create --help lists --json Output JSON (number, url, title) under CREATE OPTIONS, and the README shows fledge github prs create --title "My feature" --draft --json.
-
bin/fledge-github-prs (v0.4.0) implements the create path as:
if [ "$JSON" = "true" ]; then
gh pr create "${ARGS[@]}" --json number,url,title
-
gh pr create does not support --json (only gh pr list / gh pr view do). Repro with gh 2.83.1:
$ gh pr create --json number,url,title
unknown flag: --json
So any consumer following the documented interface gets a non-zero exit at PR creation time. Note the failure can bite after the branch is already pushed, which makes it especially confusing in automation: the push succeeds, the PR step fails.
Suggested fix
Drop --json from the gh pr create invocation. gh pr create prints the new PR URL on stdout on success, so the JSON mode can be synthesized from that single line, e.g. parse the URL, extract the PR number from the path, and optionally call gh pr view <num> --json number,url,title for an authoritative response. Alternatively document that create ignores --json and always prints the URL.
Environment
- fledge-plugin-github v0.4.0 (pinned)
- gh 2.83.1 (2025-11-13)
- macOS (Apple Silicon, Homebrew install)
Bug
fledge github prs create --jsoncannot succeed in v0.4.0.Evidence:
The built-in help advertises the flag combination —
fledge github prs create --helplists--json Output JSON (number, url, title)under CREATE OPTIONS, and the README showsfledge github prs create --title "My feature" --draft --json.bin/fledge-github-prs(v0.4.0) implements the create path as:gh pr createdoes not support--json(onlygh pr list/gh pr viewdo). Repro with gh 2.83.1:So any consumer following the documented interface gets a non-zero exit at PR creation time. Note the failure can bite after the branch is already pushed, which makes it especially confusing in automation: the push succeeds, the PR step fails.
Suggested fix
Drop
--jsonfrom thegh pr createinvocation.gh pr createprints the new PR URL on stdout on success, so the JSON mode can be synthesized from that single line, e.g. parse the URL, extract the PR number from the path, and optionally callgh pr view <num> --json number,url,titlefor an authoritative response. Alternatively document that create ignores--jsonand always prints the URL.Environment