-
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
chore(x/group): update supported flags #22229
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,7 @@ func parseMembers(membersFile string) ([]group.MemberRequest, error) { | |
|
||
func execFromString(execStr string) group.Exec { | ||
exec := group.Exec_EXEC_UNSPECIFIED | ||
if execStr == ExecTry { | ||
if execStr == ExecTry || execStr == "1" { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the condition for "1" to align with PR objectives The current change contradicts the PR objectives and the linked issue #22220. Adding the condition Please modify the function to only accept "try" (case-insensitive) for immediate execution. Here's the suggested change: -if execStr == ExecTry || execStr == "1" {
+if strings.EqualFold(execStr, ExecTry) {
exec = group.Exec_EXEC_TRY
} Also, consider adding a comment explaining the accepted values: // execFromString converts a string to group.Exec
// Only "try" (case-insensitive) is accepted for immediate execution
// All other values result in group.Exec_EXEC_UNSPECIFIED
func execFromString(execStr string) group.Exec {
// ... (rest of the function)
} This change ensures that only "try" (case-insensitive) is accepted for immediate execution, aligning with the PR objectives and preventing potential confusion or bugs. |
||
exec = group.Exec_EXEC_TRY | ||
} | ||
|
||
|
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.
Correct the help string to accurately reflect the allowed value for
FlagExec
.The help string suggests that both
1
and'try'
can be used to execute the proposal immediately after creation. However, according to the PR objectives and linked issue #22220, only'try'
is the valid value. Using1
does not trigger immediate execution and can lead to confusion for users. Please update the help string to reflect this accurately.Apply this diff to correct the help string:
📝 Committable suggestion