refine pm cli and descriptions
This commit is contained in:
@@ -86,18 +86,20 @@ func init() {
|
|||||||
RootCmd.AddCommand(issues.CommentCmd)
|
RootCmd.AddCommand(issues.CommentCmd)
|
||||||
RootCmd.AddCommand(issues.CommentsCmd)
|
RootCmd.AddCommand(issues.CommentsCmd)
|
||||||
|
|
||||||
var SurveyRootCmd = survey.RootCmd
|
|
||||||
SurveyRootCmd.GroupID = "survey"
|
|
||||||
RootCmd.AddGroup(&cobra.Group{ID: "survey", Title: "Survey Commands"})
|
RootCmd.AddGroup(&cobra.Group{ID: "survey", Title: "Survey Commands"})
|
||||||
|
survey.StartCmd.GroupID = "survey"
|
||||||
|
survey.StatusCmd.GroupID = "survey"
|
||||||
|
survey.SubmitCmd.GroupID = "survey"
|
||||||
|
survey.ListTasksCmd.GroupID = "survey"
|
||||||
|
survey.ListInterfacesCmd.GroupID = "survey"
|
||||||
|
|
||||||
survey.StartCmd.RunE = runStartCmd
|
survey.StartCmd.RunE = runStartCmd
|
||||||
SurveyRootCmd.AddCommand(survey.StartCmd)
|
RootCmd.AddCommand(survey.StartCmd)
|
||||||
SurveyRootCmd.AddCommand(survey.StatusCmd)
|
RootCmd.AddCommand(survey.StatusCmd)
|
||||||
SurveyRootCmd.AddCommand(survey.SubmitCmd)
|
RootCmd.AddCommand(survey.SubmitCmd)
|
||||||
SurveyRootCmd.AddCommand(survey.ListTasksCmd)
|
|
||||||
SurveyRootCmd.AddCommand(survey.ListInterfacesCmd)
|
|
||||||
|
|
||||||
RootCmd.AddCommand(SurveyRootCmd)
|
RootCmd.AddCommand(survey.ListTasksCmd)
|
||||||
|
RootCmd.AddCommand(survey.ListInterfacesCmd)
|
||||||
|
|
||||||
RootCmd.AddGroup(&cobra.Group{ID: "other", Title: "Additional Commands"})
|
RootCmd.AddGroup(&cobra.Group{ID: "other", Title: "Additional Commands"})
|
||||||
RootCmd.SetHelpCommandGroupID("other")
|
RootCmd.SetHelpCommandGroupID("other")
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ const (
|
|||||||
IntroTitle = "Project Management Interface Survey"
|
IntroTitle = "Project Management Interface Survey"
|
||||||
IntroductionText = `This survey evaluates how people use different project management interfaces to complete common tasks.
|
IntroductionText = `This survey evaluates how people use different project management interfaces to complete common tasks.
|
||||||
You will complete a short set of task-based exercises and answer a few follow-up questions about the experience.
|
You will complete a short set of task-based exercises and answer a few follow-up questions about the experience.
|
||||||
Your feedback helps us compare interface design and usability.`
|
Your feedback helps us compare interface design and usability.
|
||||||
|
|
||||||
|
The survey takes around 15-20 minutes to complete.`
|
||||||
|
|
||||||
Disclaimer = `Data Collection Notice
|
Disclaimer = `Data Collection Notice
|
||||||
|
|
||||||
|
|||||||
@@ -78,10 +78,10 @@ func BaseDetails(interfaceType InterfaceType) TaskDetails {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return TaskDetails{
|
return TaskDetails{
|
||||||
Title: "Base Task",
|
Title: "title not set",
|
||||||
Description: "This is a base task.",
|
Description: "description not set",
|
||||||
TimeToComplete: "10m",
|
TimeToComplete: "not set",
|
||||||
Difficulty: "Easy",
|
Difficulty: "not set",
|
||||||
InterfaceType: interfaceType,
|
InterfaceType: interfaceType,
|
||||||
InterfaceDescription: interfaceDesc,
|
InterfaceDescription: interfaceDesc,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ type Flags struct {
|
|||||||
// RootCmd is the base command for the CLI application.
|
// RootCmd is the base command for the CLI application.
|
||||||
var RootCmd = &cobra.Command{
|
var RootCmd = &cobra.Command{
|
||||||
Use: "pm",
|
Use: "pm",
|
||||||
Short: "Project Management CLI",
|
Short: "Project Management User Interface Comparison CLI",
|
||||||
Long: `Project Management CLI for managing issues and tasks.`,
|
Long: `Project Management User Interface Comparison CLI is a tool designed to evaluate and compare different project management interfaces through a series of tasks and surveys.`,
|
||||||
PersistentPreRun: func(cmd *cobra.Command, args []string) {
|
PersistentPreRun: func(cmd *cobra.Command, args []string) {
|
||||||
// Inject app into context for all commands
|
// Inject app into context for all commands
|
||||||
if app != nil {
|
if app != nil {
|
||||||
|
|||||||
@@ -26,6 +26,11 @@ func execute(input string) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if after, ok := strings.CutPrefix(input, "pm"); ok {
|
if after, ok := strings.CutPrefix(input, "pm"); ok {
|
||||||
|
|
||||||
|
if strings.Contains(strings.Split(after, " ")[1], "start") {
|
||||||
|
return "Nice try👻", nil
|
||||||
|
}
|
||||||
|
|
||||||
return executePMCommand(after)
|
return executePMCommand(after)
|
||||||
}
|
}
|
||||||
return executeShellCommand(input)
|
return executeShellCommand(input)
|
||||||
|
|||||||
Reference in New Issue
Block a user