Skip to content

Commit 982ffe2

Browse files
authored
Merge pull request #3056 from carapace-sh/but-updates-0.17.4
but: updates from 0.17.4
2 parents aed24eb + 75b846a commit 982ffe2

File tree

7 files changed

+138
-0
lines changed

7 files changed

+138
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var help_reviewCmd = &cobra.Command{
9+
Use: "review",
10+
Short: "Command for creating and publishing code reviews to a forge",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(help_reviewCmd).Standalone()
16+
17+
helpCmd.AddCommand(help_reviewCmd)
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var help_review_publishCmd = &cobra.Command{
9+
Use: "publish",
10+
Short: "Publish review requests for active branches in your workspace. By default, publishes reviews for all active branches",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(help_review_publishCmd).Standalone()
16+
17+
help_reviewCmd.AddCommand(help_review_publishCmd)
18+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var reviewCmd = &cobra.Command{
9+
Use: "review",
10+
Short: "Command for creating and publishing code reviews to a forge",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(reviewCmd).Standalone()
16+
17+
reviewCmd.Flags().BoolP("help", "h", false, "Print help")
18+
rootCmd.AddCommand(reviewCmd)
19+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var review_helpCmd = &cobra.Command{
9+
Use: "help",
10+
Short: "Print this message or the help of the given subcommand(s)",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(review_helpCmd).Standalone()
16+
17+
reviewCmd.AddCommand(review_helpCmd)
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var review_help_helpCmd = &cobra.Command{
9+
Use: "help",
10+
Short: "Print this message or the help of the given subcommand(s)",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(review_help_helpCmd).Standalone()
16+
17+
review_helpCmd.AddCommand(review_help_helpCmd)
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var review_help_publishCmd = &cobra.Command{
9+
Use: "publish",
10+
Short: "Publish review requests for active branches in your workspace. By default, publishes reviews for all active branches",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(review_help_publishCmd).Standalone()
16+
17+
review_helpCmd.AddCommand(review_help_publishCmd)
18+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/but"
6+
"github.com/spf13/cobra"
7+
)
8+
9+
var review_publishCmd = &cobra.Command{
10+
Use: "publish",
11+
Short: "Publish review requests for active branches in your workspace. By default, publishes reviews for all active branches",
12+
Run: func(cmd *cobra.Command, args []string) {},
13+
}
14+
15+
func init() {
16+
carapace.Gen(review_publishCmd).Standalone()
17+
18+
review_publishCmd.Flags().StringP("branch", "b", "", "Publish reviews only for the specified branch")
19+
review_publishCmd.Flags().BoolP("default", "t", false, "Whether to use just the branch name as the review title, without opening an editor")
20+
review_publishCmd.Flags().BoolP("help", "h", false, "Print help")
21+
review_publishCmd.Flags().BoolP("run-hooks", "r", false, "Run pre-push hooks (defaults to true)")
22+
review_publishCmd.Flags().BoolP("skip-force-push-protection", "s", false, "Skip force push protection checks")
23+
review_publishCmd.Flags().BoolP("with-force", "f", false, "Force push even if it's not fast-forward (defaults to true)")
24+
reviewCmd.AddCommand(review_publishCmd)
25+
26+
carapace.Gen(review_publishCmd).FlagCompletion(carapace.ActionMap{
27+
"branch": but.ActionLocalBranches(),
28+
})
29+
}

0 commit comments

Comments
 (0)