Repository navigation
fix(member): use the /memberships resource that replaced the member endpoints - #66
Merged
Merged
Conversation
…ndpoints
source.coop#679 replaced /accounts/{id}/members,
/products/{account}/{product}/members and /memberships/{id}/accept,
/reject and /revoke with one resource, so `member list` 404'd on staging:
- a scope's members: GET /memberships?membership_account_id=…[&product_id=…],
every page
- your own: GET /memberships?account_id=YOU&state=…
- invite: POST /memberships with membership_account_id and product_id
- accept, reject, revoke and leave: PATCH /memberships/{id} {"state": …}
A product membership is named by `product_id` now; `repository_id` is
still read from older servers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Claude finished @alukach's task in 11s —— View job ✅ No blocking issues — safe to merge. The diff matches the PR description. I read it but did not run the build or tests.
Not covered by the diff: invites, role changes and accepting are only tested against mocks, as the PR notes, so check them on staging when you can. Simplify (ponytail)
💰 Estimated review cost: $0.13 · 0m11s · 5 turns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
source-coop member listfails with a 404 on staging. #57 calls/accounts/{id}/members, but source.coop#679 replaced that endpoint, along with/products/{account}/{product}/membersand/memberships/{id}/accept,/rejectand/revoke, with one/membershipsresource:The commands look and behave as before. Only the requests underneath change:
member list ORG[/PRODUCT]GET /memberships?membership_account_id=ORG[&product_id=PRODUCT], every pageinvitation list,member leaveGET /memberships?account_id=YOU&state=…, with your account from/whoamimember invitePOST /membershipswithmembership_account_id,product_id,account_idandrolemember editPATCH /memberships/{id}{role}(unchanged)PATCH /memberships/{id}{"state": "member"}, then{"state": "revoked"}product_id.repository_idis still read from older servers. The README's JSON field list saysproduct_id.This was pushed to #57's branch after #57 merged, so it's here instead.
Testing
cargo fmt,cargo clippy --all-targets -- -D warnings,cargo testandcargo test --features stagingpass (140 tests). The mocks now use the new paths and the paged responses.GET /memberships?membership_account_id=developmentseed, which returns the page the CLI reads. Listing has been tried signed in. Invites, role changes and accepting are covered by mocked tests only.🤖 Generated with Claude Code