-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2340 from carapace-sh/add-doing
added doing
- Loading branch information
Showing
28 changed files
with
662 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var initCmd = &cobra.Command{ | ||
Use: "doing init [OPTIONS] [REFERENCE_ISSUE]", | ||
Short: "Create a .doing-cli-config file", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(initCmd).Standalone() | ||
|
||
initCmd.Flags().Bool("help", false, "Show this message and exit.") | ||
rootCmd.AddCommand(initCmd) | ||
|
||
// TODO positional completion | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var issueCmd = &cobra.Command{ | ||
Use: "issue [OPTIONS] COMMAND [ARGS]...", | ||
Short: "Work with issues", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(issueCmd).Standalone() | ||
|
||
issueCmd.Flags().Bool("help", false, "Show this message and exit.") | ||
rootCmd.AddCommand(issueCmd) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var issue_closeCmd = &cobra.Command{ | ||
Use: "close [OPTIONS] WORK_ITEM_ID...", | ||
Short: "Close a specific WORK_ITEM_ID", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(issue_closeCmd).Standalone() | ||
|
||
issue_closeCmd.Flags().Bool("help", false, "Show this message and exit.") | ||
issueCmd.AddCommand(issue_closeCmd) | ||
|
||
// TODO positional completion | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/doing" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var issue_createCmd = &cobra.Command{ | ||
Use: "create [OPTIONS] ISSUE", | ||
Short: "Create an issue", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(issue_createCmd).Standalone() | ||
|
||
issue_createCmd.Flags().Bool("add-to-current-sprint", false, "If the item needs to be added to the current sprint") | ||
issue_createCmd.Flags().StringP("assignee", "a", "", "Emailadres or alias of person to assign") | ||
issue_createCmd.Flags().StringP("body", "b", "", "Optional description of the work item") | ||
issue_createCmd.Flags().Bool("do-not-add-to-current-sprint", false, "If the item needs to be added to the current sprint") | ||
issue_createCmd.Flags().Bool("help", false, "Show this message and exit") | ||
issue_createCmd.Flags().StringP("label", "l", "", "Attach tags (labels) to work item") | ||
issue_createCmd.Flags().BoolP("mine", "m", false, "Assign issue to yourself") | ||
issue_createCmd.Flags().Bool("not-mine", false, "Do not assign issue to yourself") | ||
issue_createCmd.Flags().StringP("parent", "p", "", "To create a child work item, specify the ID of the parent work item") | ||
issue_createCmd.Flags().StringP("story_points", "s", "", "The number of story points to assign assigned if not specified") | ||
issue_createCmd.Flags().StringP("type", "t", "", "Type of work item") | ||
issueCmd.AddCommand(issue_createCmd) | ||
|
||
// TODO completion | ||
carapace.Gen(issue_createCmd).FlagCompletion(carapace.ActionMap{ | ||
"assignee": carapace.ActionValues("@me"), | ||
"body": carapace.ActionValues(), | ||
"label": carapace.ActionValues(), | ||
"parent": carapace.ActionValues(), | ||
"story_points": carapace.ActionValues(), | ||
"type": doing.ActionWorkItemTypes(), | ||
}) | ||
|
||
// TODO positional completion | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/doing" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var issue_listCmd = &cobra.Command{ | ||
Use: "list [OPTIONS]", | ||
Short: "List issues related to the project", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(issue_listCmd).Standalone() | ||
|
||
issue_listCmd.Flags().StringP("assignee", "a", "", "Filter by assignee") | ||
issue_listCmd.Flags().StringP("author", "A", "", "Filter by author") | ||
issue_listCmd.Flags().Bool("help", false, "Show this message and exit") | ||
issue_listCmd.Flags().StringP("label", "l", "", "Filter by labels") | ||
issue_listCmd.Flags().Bool("no-show_state", false, "Do not show column with work item state") | ||
issue_listCmd.Flags().Bool("no-web", false, "Open overview of issues in the web browser") | ||
issue_listCmd.Flags().StringP("output_format", "o", "", "Output format") | ||
issue_listCmd.Flags().Bool("show_state", false, "Show column with work item state") | ||
issue_listCmd.Flags().StringP("state", "s", "", "Filter by state") | ||
issue_listCmd.Flags().String("story_points", "", "Filter on number of story points") | ||
issue_listCmd.Flags().StringP("type", "t", "", "Type of work item") | ||
issue_listCmd.Flags().BoolP("web", "w", false, "Open overview of issues in the web browser") | ||
issueCmd.AddCommand(issue_listCmd) | ||
|
||
// TODO completion | ||
carapace.Gen(issue_listCmd).FlagCompletion(carapace.ActionMap{ | ||
"assignee": carapace.ActionValues(), | ||
"author": carapace.ActionValues(), | ||
"label": carapace.ActionValues(), | ||
"output_format": carapace.ActionValues("table", "array"), | ||
"state": carapace.ActionValues(), | ||
"story_points": carapace.ActionValues(), | ||
"type": doing.ActionWorkItemTypes(), | ||
}) | ||
|
||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/doing" | ||
"github.com/carapace-sh/carapace/pkg/style" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var listCmd = &cobra.Command{ | ||
Use: "list [OPTIONS]", | ||
Short: "List issues related to the project", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(listCmd).Standalone() | ||
|
||
listCmd.Flags().StringP("assignee", "a", "", "Filter by assignee") | ||
listCmd.Flags().StringP("author", "A", "", "Filter by author") | ||
listCmd.Flags().Bool("help", false, "Show this message and exit") | ||
listCmd.Flags().StringP("label", "l", "", "Filter by labels") | ||
listCmd.Flags().StringP("output_format", "o", "", "Output format") | ||
listCmd.Flags().StringP("state", "s", "", "Filter by state") | ||
listCmd.Flags().String("story_points", "", "Filter on number of story points") | ||
listCmd.Flags().StringP("type", "t", "", "Type of work item") | ||
rootCmd.AddCommand(listCmd) | ||
|
||
// TODO completion | ||
carapace.Gen(listCmd).FlagCompletion(carapace.ActionMap{ | ||
"assignee": carapace.ActionValues(), | ||
"author": carapace.ActionValues(), | ||
"label": carapace.ActionValues(), | ||
"output_format": carapace.ActionValues("table", "array"), | ||
"state": carapace.ActionValues("open", "closed", "all").StyleF(style.ForKeyword), // TODO custom states | ||
"story_points": carapace.ActionValues(), | ||
"type": doing.ActionWorkItemTypes(), | ||
}) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var openCmd = &cobra.Command{ | ||
Use: "open [OPTIONS] COMMAND [ARGS]...", | ||
Short: "Quickly open certain links", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(openCmd).Standalone() | ||
|
||
openCmd.Flags().Bool("help", false, "Show this message and exit.") | ||
rootCmd.AddCommand(openCmd) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var open_boardCmd = &cobra.Command{ | ||
Use: "board", | ||
Short: "Open board view", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(open_boardCmd).Standalone() | ||
|
||
open_boardCmd.Flags().Bool("help", false, "Show this message and exit.") | ||
openCmd.AddCommand(open_boardCmd) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var open_branchCmd = &cobra.Command{ | ||
Use: "branch", | ||
Short: "Open a specific BRANCH_NAME", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(open_branchCmd).Standalone() | ||
|
||
open_branchCmd.Flags().Bool("help", false, "Show this message and exit.") | ||
openCmd.AddCommand(open_branchCmd) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var open_branchesCmd = &cobra.Command{ | ||
Use: "branches", | ||
Short: "Open an overview of the repositories' branches", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(open_branchesCmd).Standalone() | ||
|
||
open_branchesCmd.Flags().Bool("help", false, "Show this message and exit.") | ||
openCmd.AddCommand(open_branchesCmd) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var open_issueCmd = &cobra.Command{ | ||
Use: "issue", | ||
Short: "Open a specific WORK_ITEM_ID", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(open_issueCmd).Standalone() | ||
|
||
open_issueCmd.Flags().Bool("help", false, "Show this message and exit.") | ||
openCmd.AddCommand(open_issueCmd) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var open_issuesCmd = &cobra.Command{ | ||
Use: "issues", | ||
Short: "Open all active issues view", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(open_issuesCmd).Standalone() | ||
|
||
open_issuesCmd.Flags().Bool("help", false, "Show this message and exit.") | ||
openCmd.AddCommand(open_issuesCmd) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var open_pipeCmd = &cobra.Command{ | ||
Use: "pipe", | ||
Short: "Open latest pipeline runs for repository view", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(open_pipeCmd).Standalone() | ||
|
||
open_pipeCmd.Flags().Bool("help", false, "Show this message and exit.") | ||
openCmd.AddCommand(open_pipeCmd) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var open_policiesCmd = &cobra.Command{ | ||
Use: "policies", | ||
Short: "Will show the default branch policies by default", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(open_policiesCmd).Standalone() | ||
|
||
open_policiesCmd.Flags().Bool("help", false, "Show this message and exit.") | ||
openCmd.AddCommand(open_policiesCmd) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var open_prCmd = &cobra.Command{ | ||
Use: "pr", | ||
Short: "Open a specific PULLREQUEST_ID", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(open_prCmd).Standalone() | ||
|
||
open_prCmd.Flags().Bool("help", false, "Show this message and exit.") | ||
openCmd.AddCommand(open_prCmd) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var open_prsCmd = &cobra.Command{ | ||
Use: "prs", | ||
Short: "Open active PRs for repository view", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(open_prsCmd).Standalone() | ||
|
||
open_prsCmd.Flags().Bool("help", false, "Show this message and exit.") | ||
openCmd.AddCommand(open_prsCmd) | ||
} |
Oops, something went wrong.