fix(admin): render social provider results, accept keys - #667
Merged
Conversation
- add *admin.SocialProvider and SocialProvidersDeleteResult cases to renderAdminResult so create/get/update/enable/disable no longer fail with an unroutable result type - resolve a non-numeric positional to a provider key (e.g. google) via the configured provider list, mirroring platform-domain name lookup - add render and key-resolution tests
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
pcfreak30
marked this pull request as ready for review
September 2, 2026 21:27
Code Coverage ReportTotal Coverage: 50.1% Generated from commit: 33a8245 |
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.
Adds render cases for the admin social-provider operations so
social-providers create/get/update/enable/disableprint the returned provider (human field group and JSON) instead of failing with an unroutable result type after the API call succeeds; delete gets the same treatment for its human output.Resolves a non-numeric positional across the social-provider get/update/delete/enable/disable operations by matching the provider key (for example
google) against the configured provider list, mirroring the platform-domain name lookup. Unmatched keys produce an error pointing tosocial-providers listrather than a bare 400 from the backend.Adds tests for the provider and delete renderings in both output modes and for key resolution.
This pull request fixes the admin CLI rendering for social provider operations and adds support for resolving social provider identifiers by their provider key (e.g., "google") in addition to numeric IDs.
Changes include:
Rendering support for social provider results (
internal/cli/catalog_admin_wiring.go):*admin.SocialProviderobjects (returned by create, get, update, enable, and disable operations) and*catalogops.SocialProvidersDeleteResultobjects (returned by delete operations).Provider key resolution (
internal/cli/catalog_admin_wiring.go):resolveSocialProviderIDfunction that allows operators to supply either a numeric record ID (passed through unchanged) or a provider key (e.g., "google") which is resolved by listing configured providers and matching onProviderId.Operation name constants (
internal/catalogops/admin_social_providers.go):OpAdminSocialProvidersCreate,OpAdminSocialProvidersGet,OpAdminSocialProvidersUpdate,OpAdminSocialProvidersDelete,OpAdminSocialProvidersEnable,OpAdminSocialProvidersDisable) to keep them consistent with other operation constants used by the wiring layer.Test coverage (new file
internal/cli/catalog_admin_social_providers_render_test.go):