feat(ticketing): add unified tags (account + ticket/user/org)#99
Merged
Conversation
Adds a single TagApiClient and TagsService that covers the Zendesk account-level tag listing and per-resource tag operations (add/set/remove) across tickets, users, and organizations. - list_account paginates /api/v2/tags (id, name, count) - list_for / add / set / remove dispatch on resource name (ticket|user|organization) to the correct tags endpoint - remove uses DELETE with a json body - invalid resource names raise ValueError Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| def test_remove_handles_none_response(http): | ||
| http.delete.return_value = None | ||
| client = TagApiClient(http) | ||
| assert client.remove(resource="ticket", resource_id=1, tags=["x"]) == [] |
| return uuid.uuid4().hex[:10] | ||
|
|
||
|
|
||
| def _first_ticket_id(ticketing: Ticketing) -> int: |
|
52 tasks
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.



Summary
TagApiClientandTagsServiceunifying the Zendesk account-level tag listing (/api/v2/tags) with per-resource tag operations (add/set/remove) across tickets, users, and organizations.ticket|user|organization) to the correct endpoint; invalid resource raisesValueError.self.tagsonto theTicketingfacade.Test plan
tests/unit/ticketing/test_tag_client.py(paths, payloads, iterable-to-list, None response handling, error propagation)tests/unit/ticketing/test_tags_service.py(delegation + error propagation)tag_api_client.pyandtags_service.pytests/integration/ticketing/test_tags.py(list account, list_for ticket, add/set/remove lifecycle, invalid resource)Part of #79 (Batch 2 — unified tags).
🤖 Generated with Claude Code