fix(prs): add --json output and fix relative-URL crash (FJ-2) #21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/pr-status-json-relative-url"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
fj pr status <id>crashed when the Forgejo API returned commit statuses whosetarget_urlwas relative (e.g./owner/repo/actions/runs/85/jobs/0). The crash came fromforgejo_api::structs::CommitStatus::target_urlbeing typedOption<url::Url>, and theurlcrate rejecting relative URLs without a base. Bypass the typed deserialization viaRequest::response_typeand a localLocalCombinedStatusthat carriestarget_urlasOption<String>; the JSON printer resolves it against the host URL before emitting.Adds
--jsontofj pr status, producing a machine-readable record withpr,head_sha,state(combined CI state, following Forgejo's combined-status semantics),mergeable,merged, andstatuses[](context,state,description,target_url). Merged PRs additionally carrymerged_by/merged_at. The--waitloop suppresses its incremental human-readable progress when paired with--jsonso only the final JSON record reaches stdout.#FJ-2 State Done