feat: flatten domain suggest term pricing and prefix next-actions with gddy#90
Merged
Merged
Conversation
…h gddy Flatten domain suggest's 1yr/2yr TermPrice entries into scalar price1Year/renewalPrice1Year/price2Year/renewalPrice2Year/currency fields, matching the headline-price convention already used by `domain available`/`domain quote`. Prefix every suggested next-action command with the `gddy` binary name (via a new crate::next_action wrapper) so next-step text is directly copy-pasteable, e.g. `gddy domain quote <domain>` instead of `domain quote <domain>`.
There was a problem hiding this comment.
Pull request overview
This PR improves CLI UX and output consistency by (1) flattening domain suggest’s multi-term pricing array into scalar, table-friendly fields and (2) ensuring all suggested “next actions” are copy/paste-ready by prefixing commands with the gddy binary name via a shared wrapper.
Changes:
- Flatten
domain suggestpricing intoprice1Year,renewalPrice1Year,price2Year,renewalPrice2Year, andcurrency, and add focused unit tests for the transformation. - Introduce
crate::next_action::next_actionand switch existingNextAction::new(...)callsites to use it so commands are prefixed withgddy. - Add
term_for_periodhelper to support selecting specific term lengths fromTermPrice[].
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| rust/src/payments/mod.rs | Switch next-action construction to next_action(...) so suggested commands include gddy. |
| rust/src/pat/mod.rs | Prefix PAT command next-action with gddy via shared helper. |
| rust/src/next_action.rs | New helper that prefixes suggested next-action commands with APP_ID (gddy). |
| rust/src/main.rs | Root next actions now use next_action(...); module wired into the crate. |
| rust/src/hosting/nodejs/mod.rs | Update all hosting/nodejs next actions to use the gddy-prefixed helper. |
| rust/src/domain/suggest.rs | Flatten pricing fields, update schema/default fields, and add tests for JSON shaping. |
| rust/src/domain/quote.rs | Prefix domain quote next actions with gddy. |
| rust/src/domain/purchase.rs | Prefix purchase flow next actions with gddy. |
| rust/src/domain/operation.rs | Prefix operation-status next actions with gddy. |
| rust/src/domain/nameservers.rs | Prefix nameserver update next actions with gddy. |
| rust/src/domain/list.rs | Prefix domain list next actions with gddy. |
| rust/src/domain/get.rs | Prefix domain get next actions with gddy. |
| rust/src/domain/contacts.rs | Prefix contacts group next actions with gddy. |
| rust/src/domain/common.rs | Add term_for_period helper used by domain suggest pricing flattening. |
| rust/src/domain/available.rs | Prefix available next actions with gddy. |
| rust/src/domain/agreements.rs | Prefix agreements next actions with gddy. |
| rust/src/dns/mod.rs | Ensure DNS “verify with list” next action is gddy-prefixed. |
| rust/src/application/commands/mod.rs | Prefix application command next actions with gddy. |
| rust/src/api_explorer/mod.rs | Prefix API explorer next actions with gddy. |
| rust/src/actions_catalog/mod.rs | Prefix actions-catalog next actions with gddy. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Addresses Copilot review feedback on PR #90: a suggestion term with only a renewal price (no indicative price) previously emitted renewalPriceNYear with no currency field. Also corrects a stale doc comment on headline_price (no longer shared with suggest).
axburgess-godaddy
approved these changes
Jul 10, 2026
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
domain suggest's 1yr/2yrTermPriceentries into scalarprice1Year/renewalPrice1Year/price2Year/renewalPrice2Year/currencyfields, matching the headline-price convention already used bydomain available/domain quote.gddybinary name (via a newcrate::next_actionwrapper) so next-step text is directly copy-pasteable, e.g.gddy domain quote <domain>instead ofdomain quote <domain>.Feedback threads for context:
gddyTest plan
cargo check --package godaddy-clicargo clippy --package godaddy-cli -- -D warningscargo test --package godaddy-cli(226 passed)cargo fmt -- --checkcargo run --root next actions render withgddyprefix (e.g.gddy auth status)