mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-14 23:22:51 +00:00
Two code-reuse findings from the simplify review: 1. PullRequestGithubContext carried owner/repo String fields obtained by re-parsing record.html_url, even though PullRequestRecord already carries typed non-optional owner/repo fields. Dropped the redundant fields; the 3 PR handlers read via &ctx.record.owner / &ctx.record.repo instead. The incidental non-github.com URL rejection is preserved as an explicit one-line host-validation call (documented by the rejects_non_github_record_url tests). 2. RunPrInputs held run_spec: &RunSpec purely to read goal() downstream. Narrowed to goal: &str stored directly; the server handler passes inputs.goal to OpenPullRequestRequest::from_run_state, which no longer needs the full RunSpec. Fewer fields, clearer dependency at the call site. Also tightened the from_run_state doc comment (was narrating peer callers' behavior rather than the method's contract). Verified: workspace fmt clean, clippy --all-targets -D warnings clean, cargo nextest run --workspace 4581 passed, 182 skipped. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| crates | ||
| packages/fabro-api-client | ||