feat: Replace codegen with my-clients #22
No reviewers
Labels
No labels
automerge
bug
dependencies
duplicate
enhancement
help wanted
invalid
migrations
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Personal/my-cli!22
Loading…
Reference in a new issue
No description provided.
Delete branch "use-my-clients"
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?
The diff is mostly the deleted contracts JSON. Let me search for the meaningful
The bash/Grep tools are unavailable in this environment, so I'll continue reading the diff with the Read tool. Let me skip past the deleted JSON contract to the code
{
"summary": "# Review Summary\n\nThis revision of PR #22 replaces the build-time OpenAPI codegen (build.rs/openapi-gen-build), the committed
contracts/forgejo.json, and the JRE/openapi-generator-cli install steps with a call into the sharedmy-clientsForgejo client. The cleanup is consistent across Cargo.{toml,lock}, CI, the Nix flake, and docs.\n\nBoth non-blocking items from the previous review round have been addressed:\n-reqwestis no longer a direct dependency ofmy-forge.\n- TheAuthorizationheader change (Bearer token {token}->token {token}, which also fixes a latent bug since Forgejo documents thetokenscheme) is now exercised: the newconfigure_sets_forgejo_token_authorization_headertest incrates/my-forge/src/integration/forgejo.rs:43wires a mock that requiresauthorization: token test-tokenand runsrepo_searchthroughconfigure().\n\nOne previously-flagged concern remains open: the 17-positional-argumentrepo_searchcall (forgejo.rs:14-32) is fragile — an insert/reorder in themy-clientssignature compiles cleanly but silently mapsUpdated/Desc/50onto the wrong query params. The existinglib.rstests still assertsort=updated&order=desc&limit=50viaquery_param, and the new auth-header test additionally only matches method/path/header, so the mapping is only cross-checked by that one specific combination.\n\nNo security issues found; the auth-scheme fix aligns with Forgejo's documented contract. One new minor suggestion about pinning themy-clientsversion exactly is flagged below.","verdict": "changes",
"comments": [
{
"file": "Cargo.toml",
"line": 26,
"severity": "style",
"message": "
version = \"0.1.0\"has caret semantics, socargo updateor a fresh lock-less build can silently resolve a newer 0.1.x whoserepo_searchsignature differs. Becausecrates/my-forge/src/integration/forgejo.rs:14calls it positionally, a parameter insert/reorder inmy-clientswould not fail to compile and would silently misroutesort/order/limit. Consider pinning exactly (version = \"=0.1.0\") and bumping the pin in lockstep with call sites (as AGENTS.md already advises), since the lockfile only protects--lockedbuilds."}
]
}
*🤖 Review by opencode (opencode/deepseek-v4-flash-free) — verdict: comment
Code review findings from opencode.
@ -24,1 +8,3 @@}HttpClient::new().with_base_url(base_path).with_header("Authorization", format!("token {token}"))@ -100,2 +13,2 @@page: None,},pub async fn repo_search(cfg: &HttpClient) -> anyhow::Result<my_clients::forgejo::SearchResults> {cfg.repo_search(