From 7e7391bf88b8cf3da0b51b1b9bfc840645d43b32 Mon Sep 17 00:00:00 2001 From: Nick Alteen Date: Mon, 11 Sep 2023 11:28:14 -0400 Subject: [PATCH] Clarify list repo behavior (#7964) Co-authored-by: William Martin --- pkg/cmd/repo/list/list.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkg/cmd/repo/list/list.go b/pkg/cmd/repo/list/list.go index e5b031794..07729b481 100644 --- a/pkg/cmd/repo/list/list.go +++ b/pkg/cmd/repo/list/list.go @@ -6,6 +6,7 @@ import ( "strings" "time" + "github.com/MakeNowJust/heredoc" "github.com/spf13/cobra" "github.com/cli/cli/v2/api" @@ -52,9 +53,16 @@ func NewCmdList(f *cmdutil.Factory, runF func(*ListOptions) error) *cobra.Comman ) cmd := &cobra.Command{ - Use: "list []", - Args: cobra.MaximumNArgs(1), - Short: "List repositories owned by user or organization", + Use: "list []", + Args: cobra.MaximumNArgs(1), + Short: "List repositories owned by user or organization", + Long: heredoc.Docf(` + List repositories owned by a user or organization. + + Note that the list will only include repositories owned by the provided argument, + and the %[1]s--fork%[1]s or %[1]s--source%[1]s flags will not traverse ownership boundaries. For example, + when listing the forks in an organization, the output would not include those owned by individual users. + `, "`"), Aliases: []string{"ls"}, RunE: func(c *cobra.Command, args []string) error { if opts.Limit < 1 {