Skip to content

Commit

Permalink
Merge pull request #410 from concaf/concaf/fix/add-command-annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
chmouel authored Feb 7, 2022
2 parents 7ca5b2e + d3c4340 commit 7e4f96e
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pkg/cmd/pipelineascode/pipelineascode.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ func Command(cs *params.Run) *cobra.Command {
}
return runWrap(ctx, cs, providerintf, kinteract)
},
Annotations: map[string]string{
"commandType": "main",
},
}

err := cs.Info.Pac.AddFlags(cmd)
Expand Down
6 changes: 6 additions & 0 deletions pkg/cmd/tknpac/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ func Command(run *params.Run, ioStreams *cli.IOStreams) *cobra.Command {
}
return nil
},
Annotations: map[string]string{
"commandType": "main",
},
}
cmd.AddCommand(GithubApp(run, ioStreams))

Expand Down Expand Up @@ -170,6 +173,9 @@ func GithubApp(run *params.Run, ioStreams *cli.IOStreams) *cobra.Command {

return createSecret(ctx, run, opts)
},
Annotations: map[string]string{
"commandType": "main",
},
}
addCommonFlags(cmd, opts, ioStreams)
addGithubAppFlag(cmd, opts)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/tknpac/completion/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func Command() *cobra.Command {
ValidArgs: []string{"bash", "zsh", "fish", "powershell"},
Example: eg,
Annotations: map[string]string{
"commandType": "utility",
"commandType": "main",
},
Args: cobra.ExactValidArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
3 changes: 3 additions & 0 deletions pkg/cmd/tknpac/generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ func Command(ioStreams *cli.IOStreams) *cobra.Command {
gopt.GitInfo = git.GetGitInfo(cwd)
return Generate(gopt)
},
Annotations: map[string]string{
"commandType": "main",
},
}
cmd.PersistentFlags().StringVar(&gopt.event.BaseBranch, "branch", "",
"The target branch of the repository event to handle (eg: main, nightly)")
Expand Down
3 changes: 3 additions & 0 deletions pkg/cmd/tknpac/repository/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ func CreateCommand(run *params.Run, ioStreams *cli.IOStreams) *cobra.Command {

return generate.Generate(gopt)
},
Annotations: map[string]string{
"commandType": "main",
},
}

cmd.PersistentFlags().BoolP(noColorFlag, "C", !ioStreams.ColorEnabled(), "disable coloring")
Expand Down
3 changes: 3 additions & 0 deletions pkg/cmd/tknpac/repository/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ func ListCommand(run *params.Run, ioStreams *cli.IOStreams) *cobra.Command {
cw := clockwork.NewRealClock()
return list(ctx, run, opts, ioStreams, cw, selectors, noheaders)
},
Annotations: map[string]string{
"commandType": "main",
},
}

cmd.PersistentFlags().BoolVarP(&allNamespaces, allNamespacesFlag, "A", false, "If present, "+
Expand Down
3 changes: 3 additions & 0 deletions pkg/cmd/tknpac/repository/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ func Root(clients *params.Run, ioStreams *cli.IOStreams) *cobra.Command {
Short: "Pipelines as Code repositories",
Long: `Manage Pipelines as Code repositories`,
SilenceUsage: true,
Annotations: map[string]string{
"commandType": "main",
},
}
cmd.AddCommand(ListCommand(clients, ioStreams))
cmd.AddCommand(DescribeCommand(clients, ioStreams))
Expand Down
3 changes: 3 additions & 0 deletions pkg/cmd/tknpac/resolve/resolve.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ func Command(run *params.Run) *cobra.Command {
fmt.Println(s)
return err
},
Annotations: map[string]string{
"commandType": "main",
},
}
cmd.Flags().StringSliceVarP(&parameters, "params", "p", filenames,
"Params to resolve (ie: revision, repo_url)")
Expand Down
3 changes: 3 additions & 0 deletions pkg/cmd/tknpac/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ func Root(clients *params.Run) *cobra.Command {
Short: "Pipelines as Code CLI",
Long: `This is the the tkn plugin for Pipelines as Code CLI`,
SilenceUsage: true,
Annotations: map[string]string{
"commandType": "main",
},
}
clients.Info.Kube.AddFlags(cmd)

Expand Down
3 changes: 3 additions & 0 deletions pkg/cmd/tknpac/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ func Command(ioStreams *cli.IOStreams) *cobra.Command {
Run: func(cmd *cobra.Command, args []string) {
fmt.Fprintln(ioStreams.ErrOut, version.Version)
},
Annotations: map[string]string{
"commandType": "main",
},
}
return cmd
}

0 comments on commit 7e4f96e

Please sign in to comment.