Skip to content

Commit ad5a8a6

Browse files
committed
docs(repo): add long description
1 parent 38e4690 commit ad5a8a6

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

cmd/kosli/listRepos.go

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,20 @@ import (
1212
"github.com/spf13/cobra"
1313
)
1414

15-
const listReposDesc = `List repos for an org.`
15+
const listReposShortDesc = `List repos for an org. `
16+
17+
const listReposLongDesc = listReposShortDesc + `By default, all repos for the org are returned.
18+
Pass --page-limit and/or --page to paginate the results.
19+
The list can be filtered by name with --name (exact match), by VCS provider with
20+
--provider, and by external repo ID with --repo-id.`
1621

1722
const listReposExample = `
1823
# list all repos for an org:
1924
kosli list repos \
2025
--api-token yourAPIToken \
2126
--org yourOrgName
2227
23-
# list repos filtered by name:
28+
# list repos filtered by name (exact match on the full repo name):
2429
kosli list repos \
2530
--name my-org/my-repo \
2631
--api-token yourAPIToken \
@@ -52,8 +57,8 @@ func newListReposCmd(out io.Writer) *cobra.Command {
5257
o := new(listReposOptions)
5358
cmd := &cobra.Command{
5459
Use: "repos",
55-
Short: listReposDesc,
56-
Long: listReposDesc,
60+
Short: listReposShortDesc,
61+
Long: listReposLongDesc,
5762
Example: listReposExample,
5863
Args: cobra.NoArgs,
5964
PreRunE: func(cmd *cobra.Command, args []string) error {
@@ -69,7 +74,7 @@ func newListReposCmd(out io.Writer) *cobra.Command {
6974
}
7075

7176
addListFlags(cmd, &o.listOptions)
72-
cmd.Flags().StringVar(&o.name, "name", "", "[optional] The repo name to filter by.")
77+
cmd.Flags().StringVar(&o.name, "name", "", "[optional] The repo name to filter by (exact match).")
7378
cmd.Flags().StringVar(&o.provider, "provider", "", "[optional] The VCS provider to filter repos by (e.g. github, gitlab).")
7479
cmd.Flags().StringVar(&o.repoID, "repo-id", "", "[optional] The external repo ID to filter repos by.")
7580

0 commit comments

Comments
 (0)