-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(gov,cli): Create AddGovPropFlagsToCmd and ReadGovPropFlags. #14718
Conversation
…gSummary. Make FlagMetadata public. Undeprecate FlagTitle. Add unit tests on the new funcs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! lgtm.
@@ -613,7 +613,7 @@ func (s *CLITestSuite) msgSubmitLegacyProposal(clientCtx client.Context, from, t | |||
} | |||
|
|||
args := append([]string{ | |||
fmt.Sprintf("--%s=%s", govcli.FlagTitle, title), //nolint:staticcheck // SA1019: govcli.FlagTitle is deprecated: use FlagTitle instead | |||
fmt.Sprintf("--%s=%s", govcli.FlagTitle, title), | |||
fmt.Sprintf("--%s=%s", govcli.FlagDescription, description), //nolint:staticcheck // SA1019: govcli.FlagDescription is deprecated: use FlagDescription instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slightly unrelated but these comments are weird, there is nothing to use instead.
cmd.Flags().String(cli.FlagDescription, "", "description of proposal") //nolint:staticcheck // we are intentionally using a deprecated flag here. | ||
cmd.Flags().String(cli.FlagDeposit, "", "deposit of proposal") | ||
cmd.MarkFlagRequired(cli.FlagTitle) //nolint:staticcheck // we are intentionally using a deprecated flag here. | ||
cmd.MarkFlagRequired(cli.FlagTitle) |
Check warning
Code scanning / gosec
Errors unhandled.
Upgrade notes should be updated. |
I was looking around for a place in the documentation discussing how to design/implement gov v1 proposal messages/endpoints/cli/etc. but couldn't find anything. I will add this to |
As this getting in a point release, I can ping you when we backport this 👍🏾 |
@Mergifyio backport release/v0.47.x |
✅ Backports have been created
|
) (cherry picked from commit 6674402) # Conflicts: # CHANGELOG.md # x/feegrant/client/cli/tx_test.go # x/upgrade/client/cli/parse_test.go
Description
Closes: #14700
This PR:
FlagTitle
variable.FlagMetadata
variable public.FlagSummary
variable.AddGovPropFlagsToCmd
func that addsFlagDeposit
,FlagMetadata
,FlagTitle
, andFlagSummary
to a cobra command.ReadGovPropFlags
func that creates aMsgSubmitProposal
pre-populated with provided flag values and proposer (from address).Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change