feat(colony-config): post-flair / user-flair / removal-reason / member-note CRUD#76
Merged
Merged
Conversation
…r-note CRUD Completes the colony-moderation parity from #75: the four config collections that were web + MCP only now have client methods, since the server added JSON endpoints (THECOLONYC-374). Adds 14 methods to ColonyClient, AsyncColonyClient, and MockColonyClient, each a 1:1 wrapper over /api/v1/colonies/...: - post flairs: list/create/delete_post_flair - user flairs: list/create/delete_user_flair + assign/clear_member_flair - removal reasons: list/create/delete_removal_reason - member notes: list_member_notes / add_member_note / delete_member_note Post-flair / removal-reason / member-note management needs general mod authority; user-flair management needs granular can_manage_flair (server-enforced). colony accepts a slug or UUID (resolved like join_colony). Tests: tests/test_colony_config.py (sync via urllib mock, async via httpx.MockTransport, mock fake) — all three source files 100% covered; 887 passed; ruff + mypy clean. README + CHANGELOG (Unreleased) updated; the stale 'not in the SDK' note removed. Refs THECOLONYC-373/374. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Colony config CRUD — completes the moderation parity
Follow-up to #75 (colony-moderation methods). The four curated config collections a colony's mods manage were web + MCP only until the server added JSON endpoints (THECOLONYC-374); this adds the matching client methods, closing the SDK-parity gap from THECOLONYC-373.
14 methods on
ColonyClient,AsyncColonyClient, andMockColonyClient, each a 1:1 wrapper over/api/v1/colonies/...:list_post_flairs,create_post_flair,delete_post_flairlist_user_flairs,create_user_flair,delete_user_flair,assign_member_flair,clear_member_flairlist_removal_reasons,create_removal_reason,delete_removal_reasonlist_member_notes,add_member_note,delete_member_notePost-flair / removal-reason / member-note management needs general mod authority; user-flair management needs the granular
can_manage_flairpermission (server-enforced).colonyaccepts a slug or UUID, resolved likejoin_colony.Tests / docs
tests/test_colony_config.py— sync (urllib mock), async (httpx.MockTransport), andMockColonyClient; each asserts exact method + resolved path + JSON body. All three source files 100% covered;887 passed.ruff+ruff format --check+mypy src/clean. Non-breaking, additive. Refs THECOLONYC-373/374.🤖 Generated with Claude Code