Create organizations, manage teams and transfers, fix collaborator permissions #282
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/spec-parity-org"
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?
Four forge-organization-management requirements and one repositories
requirement of the fjord-client-spec.
fj org createvalidates the name and fields locally, then prints theorganization the server returned. A permission denial and a name
conflict get different headlines.
fj org team create|members|add-member|remove-member|repos|add-repo| remove-repo. Every mutation is followed by a read, and the commanderrors if that read contradicts the change. Team creation and member
changes are refused before sending when the account is neither an org
owner nor a site admin; add-repo and remove-repo have no local preflight
and rely on the server's 403.
fj repo collaborator listreported every permission as none: the listendpoint sends
permissions: nulland the field defaulted to all-false.It is now optional, and the list resolves each row through the
per-collaborator permission endpoint. A 403 on a row leaves it "unknown",
never "none".
addandremovenow confirm against the server.fj repo transfer requestinspects before it asks: it resolves the newowner, refuses an unknown owner, the current owner and an already
pending transfer, and prints who has to accept.
fj repo transfer list|view|accept|rejectreview incoming transfers. Forgejo has noincoming-transfer endpoint, so
listscans the caller's repositorylistings and can miss a transfer addressed to one of their orgs;
view -Ralways works. The help text says so.fj repo topics add|removeuse the single-topic routes and print thelist the server confirms.
--setnow reads back too instead of echoingits own input, and validates topic names locally.
Covered by unit and wiremock tests only; nothing here was run against a live forge.
repo transfer listis knowingly partial, for the reason above.Part 5 of 8 in the spec-parity stack. Based on
feat/spec-parity-issues, so the diff here is this slice alone; it needs a rebase onto main once the PR below it is squash-merged.Fixes #276
Verified on macOS at this commit:
cargo fmt --allclean,cargo clippy --all-targets --all-features -- -D warningsclean,cargo test --allgreen.