fabro/lib/crates/fabro-github
Bryan Helmkamp 1781788798
refactor: extract RunPrInputs validation; drop dead is_app_public
Two cleanups:

1. Extracted the 8 sequential let-Some-else-return validations from
   create_run_pull_request into a server-local RunPrInputs struct with
   an extract(&run_state, force) -> Result<RunPrInputs, ApiError>
   constructor. The handler shrinks from ~85 lines of validation +
   build to a single match RunPrInputs::extract(...) followed by
   creds + model + request build. All error codes/messages preserved.

2. Deleted is_app_public from fabro-github plus its 3 unit tests and
   the now-unused MockHeaderCheck::Missing / with_req_header_missing
   test-helper variants. No production caller remained after the
   server-side install flow stopped checking app visibility client-side.

Verified: workspace fmt clean, clippy --all-targets -D warnings clean,
cargo nextest run --workspace 4584 passed (down from 4587 by the 3
deleted is_app_public tests), 182 skipped.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 08:39:58 -04:00
..
src refactor: extract RunPrInputs validation; drop dead is_app_public 2026-04-24 08:39:58 -04:00
tests refactor: extend GitHubContext to remaining callers; add OpenPullRequestRequest::from_run_state 2026-04-24 08:31:14 -04:00
Cargo.toml refactor(github): replace stringly-typed PR errors with typed enum 2026-04-23 22:31:23 -04:00