|
| 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