From 94d7760ff7b845744691c9c7b050a4d2ea70435d Mon Sep 17 00:00:00 2001 From: Kai Armstrong Date: Tue, 4 Oct 2022 11:29:49 -0500 Subject: [PATCH 1/2] docs: convert documentation to markdown This converts the documentation back in to markdown. Using markdown allows us to easily integrate this in the existing GitLab documentation site. Fixes https://gitlab.com/gitlab-org/cli/-/issues/1010 --- .gitignore | 3 + cmd/gen-docs/docs.go | 80 +++++-------- commands/version/version.go | 2 +- docs/Makefile | 20 ---- docs/make.bat | 35 ------ docs/source/_static/glab.png | Bin 17831 -> 0 bytes docs/source/alias/delete.md | 14 +++ docs/source/alias/delete.rst | 24 ---- docs/source/alias/help.md | 19 ++++ docs/source/alias/help.rst | 25 ----- docs/source/alias/index.md | 16 +++ docs/source/alias/index.rst | 32 ------ docs/source/alias/list.md | 14 +++ docs/source/alias/list.rst | 24 ---- docs/source/alias/{set.rst => set.md} | 54 ++++----- docs/source/api/{index.rst => index.md} | 104 ++++++++--------- docs/source/auth/git-credential.md | 14 +++ docs/source/auth/git-credential.rst | 24 ---- docs/source/auth/help.md | 19 ++++ docs/source/auth/help.rst | 25 ----- docs/source/auth/index.md | 16 +++ docs/source/auth/index.rst | 32 ------ docs/source/auth/login.md | 41 +++++++ docs/source/auth/login.rst | 49 -------- docs/source/auth/{status.rst => status.md} | 29 ++--- docs/source/check-update/index.md | 14 +++ docs/source/check-update/index.rst | 24 ---- docs/source/ci/artifact.md | 29 +++++ docs/source/ci/ci.md | 24 ++++ docs/source/ci/ci.rst | 41 ------- docs/source/ci/{delete.rst => delete.md} | 42 +++---- docs/source/ci/{help.rst => help.md} | 22 ++-- docs/source/ci/index.md | 29 +++++ docs/source/ci/index.rst | 45 -------- docs/source/ci/lint.md | 27 +++++ docs/source/ci/lint.rst | 38 ------- docs/source/ci/{list.rst => list.md} | 42 +++---- docs/source/ci/retry.md | 22 ++++ docs/source/ci/retry.rst | 33 ------ docs/source/ci/run.md | 32 ++++++ docs/source/ci/run.rst | 44 -------- docs/source/ci/status.md | 33 ++++++ docs/source/ci/status.rst | 45 -------- docs/source/ci/trace.md | 32 ++++++ docs/source/ci/trace.rst | 44 -------- docs/source/ci/{view.rst => view.md} | 44 +++----- .../source/completion/{index.rst => index.md} | 33 +++--- docs/source/conf.py | 72 ------------ docs/source/config/{get.rst => get.md} | 44 +++----- docs/source/config/help.md | 19 ++++ docs/source/config/help.rst | 25 ----- docs/source/config/{index.rst => index.md} | 38 +++---- docs/source/config/{init.rst => init.md} | 22 ++-- docs/source/config/{set.rst => set.md} | 40 +++---- docs/source/index.md | 48 ++++++++ docs/source/index.rst | 27 ----- docs/source/intro.rst | 48 -------- docs/source/issue/board.md | 16 +++ docs/source/issue/board.rst | 32 ------ docs/source/issue/close.md | 23 ++++ docs/source/issue/close.rst | 34 ------ docs/source/issue/create.md | 46 ++++++++ docs/source/issue/create.rst | 56 --------- docs/source/issue/delete.md | 24 ++++ docs/source/issue/delete.rst | 35 ------ docs/source/issue/{help.rst => help.md} | 22 ++-- docs/source/issue/index.md | 40 +++++++ docs/source/issue/index.rst | 58 ---------- docs/source/issue/{list.rst => list.md} | 46 +++----- docs/source/issue/{note.rst => note.md} | 31 ++--- docs/source/issue/reopen.md | 24 ++++ docs/source/issue/reopen.rst | 35 ------ docs/source/issue/subscribe.md | 24 ++++ docs/source/issue/subscribe.rst | 35 ------ docs/source/issue/unsubscribe.md | 24 ++++ docs/source/issue/unsubscribe.rst | 35 ------ docs/source/issue/{update.rst => update.md} | 42 +++---- docs/source/issue/view.md | 36 ++++++ docs/source/issue/view.rst | 48 -------- docs/source/label/{create.rst => create.md} | 44 +++----- docs/source/label/{help.rst => help.md} | 22 ++-- docs/source/label/index.md | 21 ++++ docs/source/label/index.rst | 38 ------- docs/source/label/list.md | 31 +++++ docs/source/label/list.rst | 43 ------- docs/source/mr/approve.md | 32 ++++++ docs/source/mr/approve.rst | 44 -------- docs/source/mr/approvers.md | 15 +++ docs/source/mr/approvers.rst | 25 ----- docs/source/mr/checkout.md | 34 ++++++ docs/source/mr/checkout.rst | 46 -------- docs/source/mr/close.md | 27 +++++ docs/source/mr/close.rst | 38 ------- docs/source/mr/{create.rst => create.md} | 48 +++----- docs/source/mr/delete.md | 26 +++++ docs/source/mr/delete.rst | 37 ------ docs/source/mr/diff.md | 31 +++++ docs/source/mr/diff.rst | 43 ------- docs/source/mr/{for.rst => for.md} | 46 +++----- docs/source/mr/{help.rst => help.md} | 22 ++-- docs/source/mr/index.md | 48 ++++++++ docs/source/mr/index.rst | 66 ----------- docs/source/mr/issues.md | 24 ++++ docs/source/mr/issues.rst | 35 ------ docs/source/mr/{list.rst => list.md} | 58 ++++------ docs/source/mr/{merge.rst => merge.md} | 44 +++----- docs/source/mr/{note.rst => note.md} | 31 ++--- docs/source/mr/{rebase.rst => rebase.md} | 35 +++--- docs/source/mr/reopen.md | 25 +++++ docs/source/mr/reopen.rst | 36 ------ docs/source/mr/revoke.md | 26 +++++ docs/source/mr/revoke.rst | 37 ------ docs/source/mr/subscribe.md | 25 +++++ docs/source/mr/subscribe.rst | 36 ------ docs/source/mr/todo.md | 15 +++ docs/source/mr/todo.rst | 25 ----- docs/source/mr/unsubscribe.md | 25 +++++ docs/source/mr/unsubscribe.rst | 36 ------ docs/source/mr/{update.rst => update.md} | 46 +++----- docs/source/mr/{view.rst => view.md} | 31 ++--- docs/source/pipeline/ci.rst | 41 ------- docs/source/pipeline/delete.rst | 41 ------- docs/source/pipeline/help.rst | 26 ----- docs/source/pipeline/index.rst | 41 ------- docs/source/pipeline/lint.rst | 35 ------ docs/source/pipeline/list.rst | 45 -------- docs/source/pipeline/run.rst | 41 ------- docs/source/pipeline/status.rst | 43 ------- docs/source/pipeline/trace.rst | 40 ------- docs/source/pipeline/view.rst | 53 --------- docs/source/release/{create.rst => create.md} | 106 ++++++++---------- docs/source/release/{delete.rst => delete.md} | 48 ++++---- .../release/{download.rst => download.md} | 48 ++++---- docs/source/release/{help.rst => help.md} | 22 ++-- docs/source/release/index.md | 25 +++++ docs/source/release/index.rst | 42 ------- docs/source/release/list.md | 15 +++ docs/source/release/list.rst | 25 ----- docs/source/release/upload.md | 57 ++++++++++ docs/source/release/upload.rst | 65 ----------- docs/source/release/{view.rst => view.md} | 44 +++----- docs/source/repo/archive.md | 39 +++++++ docs/source/repo/archive.rst | 47 -------- docs/source/repo/{clone.rst => clone.md} | 65 +++++------ .../{contributors.rst => contributors.md} | 44 +++----- docs/source/repo/{create.rst => create.md} | 54 ++++----- docs/source/repo/delete.md | 37 ++++++ docs/source/repo/delete.rst | 45 -------- docs/source/repo/fork.md | 32 ++++++ docs/source/repo/fork.rst | 44 -------- docs/source/repo/help.md | 19 ++++ docs/source/repo/help.rst | 25 ----- docs/source/repo/index.md | 24 ++++ docs/source/repo/index.rst | 38 ------- docs/source/repo/list.md | 35 ++++++ docs/source/repo/{mirror.rst => mirror.md} | 29 ++--- docs/source/repo/search.md | 32 ++++++ docs/source/repo/search.rst | 44 -------- docs/source/repo/transfer.md | 28 +++++ docs/source/repo/view.md | 43 +++++++ docs/source/repo/view.rst | 51 --------- docs/source/snippet/create.md | 33 ++++++ docs/source/snippet/help.md | 20 ++++ docs/source/snippet/index.md | 27 +++++ docs/source/ssh-key/{add.rst => add.md} | 44 +++----- docs/source/ssh-key/get.md | 30 +++++ docs/source/ssh-key/get.rst | 37 ------ docs/source/ssh-key/{help.rst => help.md} | 22 ++-- docs/source/ssh-key/index.md | 26 +++++ docs/source/ssh-key/index.rst | 39 ------- docs/source/ssh-key/{list.rst => list.md} | 38 +++---- docs/source/user/events.md | 20 ++++ docs/source/user/events.rst | 31 ----- docs/source/user/help.md | 19 ++++ docs/source/user/help.rst | 25 ----- docs/source/user/index.md | 14 +++ docs/source/user/index.rst | 30 ----- docs/source/variable/delete.md | 31 +++++ docs/source/variable/delete.rst | 43 ------- docs/source/variable/get.md | 29 +++++ docs/source/variable/get.rst | 41 ------- docs/source/variable/{help.rst => help.md} | 22 ++-- docs/source/variable/index.md | 24 ++++ docs/source/variable/index.rst | 41 ------- docs/source/variable/list.md | 28 +++++ docs/source/variable/list.rst | 40 ------- docs/source/variable/set.md | 39 +++++++ docs/source/variable/set.rst | 51 --------- docs/source/variable/update.md | 39 +++++++ docs/source/variable/update.rst | 51 --------- docs/source/version/index.md | 14 +++ docs/source/version/index.rst | 24 ---- 192 files changed, 2594 insertions(+), 4076 deletions(-) delete mode 100644 docs/Makefile delete mode 100644 docs/make.bat delete mode 100644 docs/source/_static/glab.png create mode 100644 docs/source/alias/delete.md delete mode 100644 docs/source/alias/delete.rst create mode 100644 docs/source/alias/help.md delete mode 100644 docs/source/alias/help.rst create mode 100755 docs/source/alias/index.md delete mode 100755 docs/source/alias/index.rst create mode 100644 docs/source/alias/list.md delete mode 100644 docs/source/alias/list.rst rename docs/source/alias/{set.rst => set.md} (60%) rename docs/source/api/{index.rst => index.md} (75%) create mode 100644 docs/source/auth/git-credential.md delete mode 100644 docs/source/auth/git-credential.rst create mode 100644 docs/source/auth/help.md delete mode 100644 docs/source/auth/help.rst create mode 100755 docs/source/auth/index.md delete mode 100755 docs/source/auth/index.rst create mode 100644 docs/source/auth/login.md delete mode 100644 docs/source/auth/login.rst rename docs/source/auth/{status.rst => status.md} (64%) create mode 100755 docs/source/check-update/index.md delete mode 100755 docs/source/check-update/index.rst create mode 100644 docs/source/ci/artifact.md create mode 100644 docs/source/ci/ci.md delete mode 100644 docs/source/ci/ci.rst rename docs/source/ci/{delete.rst => delete.md} (51%) rename docs/source/ci/{help.rst => help.md} (63%) create mode 100755 docs/source/ci/index.md delete mode 100755 docs/source/ci/index.rst create mode 100644 docs/source/ci/lint.md delete mode 100644 docs/source/ci/lint.rst rename docs/source/ci/{list.rst => list.md} (67%) create mode 100644 docs/source/ci/retry.md delete mode 100644 docs/source/ci/retry.rst create mode 100644 docs/source/ci/run.md delete mode 100644 docs/source/ci/run.rst create mode 100644 docs/source/ci/status.md delete mode 100644 docs/source/ci/status.rst create mode 100644 docs/source/ci/trace.md delete mode 100644 docs/source/ci/trace.rst rename docs/source/ci/{view.rst => view.md} (61%) rename docs/source/completion/{index.rst => index.md} (71%) delete mode 100644 docs/source/conf.py rename docs/source/config/{get.rst => get.md} (51%) create mode 100644 docs/source/config/help.md delete mode 100644 docs/source/config/help.rst rename docs/source/config/{index.rst => index.md} (71%) rename docs/source/config/{init.rst => init.md} (56%) rename docs/source/config/{set.rst => set.md} (58%) create mode 100644 docs/source/index.md delete mode 100644 docs/source/index.rst delete mode 100644 docs/source/intro.rst create mode 100644 docs/source/issue/board.md delete mode 100644 docs/source/issue/board.rst create mode 100644 docs/source/issue/close.md delete mode 100644 docs/source/issue/close.rst create mode 100644 docs/source/issue/create.md delete mode 100644 docs/source/issue/create.rst create mode 100644 docs/source/issue/delete.md delete mode 100644 docs/source/issue/delete.rst rename docs/source/issue/{help.rst => help.md} (62%) create mode 100755 docs/source/issue/index.md delete mode 100755 docs/source/issue/index.rst rename docs/source/issue/{list.rst => list.md} (76%) rename docs/source/issue/{note.rst => note.md} (51%) create mode 100644 docs/source/issue/reopen.md delete mode 100644 docs/source/issue/reopen.rst create mode 100644 docs/source/issue/subscribe.md delete mode 100644 docs/source/issue/subscribe.rst create mode 100644 docs/source/issue/unsubscribe.md delete mode 100644 docs/source/issue/unsubscribe.rst rename docs/source/issue/{update.rst => update.md} (72%) create mode 100644 docs/source/issue/view.md delete mode 100644 docs/source/issue/view.rst rename docs/source/label/{create.rst => create.md} (54%) rename docs/source/label/{help.rst => help.md} (62%) create mode 100755 docs/source/label/index.md delete mode 100755 docs/source/label/index.rst create mode 100644 docs/source/label/list.md delete mode 100644 docs/source/label/list.rst create mode 100644 docs/source/mr/approve.md delete mode 100644 docs/source/mr/approve.rst create mode 100644 docs/source/mr/approvers.md delete mode 100644 docs/source/mr/approvers.rst create mode 100644 docs/source/mr/checkout.md delete mode 100644 docs/source/mr/checkout.rst create mode 100644 docs/source/mr/close.md delete mode 100644 docs/source/mr/close.rst rename docs/source/mr/{create.rst => create.md} (83%) create mode 100644 docs/source/mr/delete.md delete mode 100644 docs/source/mr/delete.rst create mode 100644 docs/source/mr/diff.md delete mode 100644 docs/source/mr/diff.rst rename docs/source/mr/{for.rst => for.md} (70%) rename docs/source/mr/{help.rst => help.md} (63%) create mode 100755 docs/source/mr/index.md delete mode 100755 docs/source/mr/index.rst create mode 100644 docs/source/mr/issues.md delete mode 100644 docs/source/mr/issues.rst rename docs/source/mr/{list.rst => list.md} (67%) rename docs/source/mr/{merge.rst => merge.md} (65%) rename docs/source/mr/{note.rst => note.md} (51%) rename docs/source/mr/{rebase.rst => rebase.md} (55%) create mode 100644 docs/source/mr/reopen.md delete mode 100644 docs/source/mr/reopen.rst create mode 100644 docs/source/mr/revoke.md delete mode 100644 docs/source/mr/revoke.rst create mode 100644 docs/source/mr/subscribe.md delete mode 100644 docs/source/mr/subscribe.rst create mode 100644 docs/source/mr/todo.md delete mode 100644 docs/source/mr/todo.rst create mode 100644 docs/source/mr/unsubscribe.md delete mode 100644 docs/source/mr/unsubscribe.rst rename docs/source/mr/{update.rst => update.md} (76%) rename docs/source/mr/{view.rst => view.md} (66%) delete mode 100644 docs/source/pipeline/ci.rst delete mode 100644 docs/source/pipeline/delete.rst delete mode 100644 docs/source/pipeline/help.rst delete mode 100755 docs/source/pipeline/index.rst delete mode 100644 docs/source/pipeline/lint.rst delete mode 100644 docs/source/pipeline/list.rst delete mode 100644 docs/source/pipeline/run.rst delete mode 100644 docs/source/pipeline/status.rst delete mode 100644 docs/source/pipeline/trace.rst delete mode 100644 docs/source/pipeline/view.rst rename docs/source/release/{create.rst => create.md} (59%) rename docs/source/release/{delete.rst => delete.md} (50%) rename docs/source/release/{download.rst => download.md} (59%) rename docs/source/release/{help.rst => help.md} (61%) create mode 100755 docs/source/release/index.md delete mode 100755 docs/source/release/index.rst create mode 100644 docs/source/release/list.md delete mode 100644 docs/source/release/list.rst create mode 100644 docs/source/release/upload.md delete mode 100644 docs/source/release/upload.rst rename docs/source/release/{view.rst => view.md} (52%) create mode 100644 docs/source/repo/archive.md delete mode 100644 docs/source/repo/archive.rst rename docs/source/repo/{clone.rst => clone.md} (55%) rename docs/source/repo/{contributors.rst => contributors.md} (57%) rename docs/source/repo/{create.rst => create.md} (61%) create mode 100644 docs/source/repo/delete.md delete mode 100644 docs/source/repo/delete.rst create mode 100644 docs/source/repo/fork.md delete mode 100644 docs/source/repo/fork.rst create mode 100644 docs/source/repo/help.md delete mode 100644 docs/source/repo/help.rst create mode 100755 docs/source/repo/index.md delete mode 100755 docs/source/repo/index.rst create mode 100644 docs/source/repo/list.md rename docs/source/repo/{mirror.rst => mirror.md} (71%) create mode 100644 docs/source/repo/search.md delete mode 100644 docs/source/repo/search.rst create mode 100644 docs/source/repo/transfer.md create mode 100644 docs/source/repo/view.md delete mode 100644 docs/source/repo/view.rst create mode 100644 docs/source/snippet/create.md create mode 100644 docs/source/snippet/help.md create mode 100755 docs/source/snippet/index.md rename docs/source/ssh-key/{add.rst => add.md} (53%) create mode 100644 docs/source/ssh-key/get.md delete mode 100644 docs/source/ssh-key/get.rst rename docs/source/ssh-key/{help.rst => help.md} (61%) create mode 100755 docs/source/ssh-key/index.md delete mode 100755 docs/source/ssh-key/index.rst rename docs/source/ssh-key/{list.rst => list.md} (56%) create mode 100644 docs/source/user/events.md delete mode 100644 docs/source/user/events.rst create mode 100644 docs/source/user/help.md delete mode 100644 docs/source/user/help.rst create mode 100755 docs/source/user/index.md delete mode 100755 docs/source/user/index.rst create mode 100644 docs/source/variable/delete.md delete mode 100644 docs/source/variable/delete.rst create mode 100644 docs/source/variable/get.md delete mode 100644 docs/source/variable/get.rst rename docs/source/variable/{help.rst => help.md} (61%) create mode 100755 docs/source/variable/index.md delete mode 100755 docs/source/variable/index.rst create mode 100644 docs/source/variable/list.md delete mode 100644 docs/source/variable/list.rst create mode 100644 docs/source/variable/set.md delete mode 100644 docs/source/variable/set.rst create mode 100644 docs/source/variable/update.md delete mode 100644 docs/source/variable/update.rst create mode 100755 docs/source/version/index.md delete mode 100755 docs/source/version/index.rst diff --git a/.gitignore b/.gitignore index 1fe982e7e..8b976c1d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ /bin .envrc +# asdf +.tool-versions + # man pages /share/man/man1 diff --git a/cmd/gen-docs/docs.go b/cmd/gen-docs/docs.go index 62c48b55b..a669a1f59 100644 --- a/cmd/gen-docs/docs.go +++ b/cmd/gen-docs/docs.go @@ -17,7 +17,6 @@ import ( "gitlab.com/gitlab-org/cli/commands" "gitlab.com/gitlab-org/cli/commands/cmdutils" "gitlab.com/gitlab-org/cli/internal/config" - "gitlab.com/gitlab-org/cli/pkg/utils" ) var tocTree = `.. toctree:: @@ -88,20 +87,20 @@ func genWebDocs(glabCli *cobra.Command, path string) error { // Generate parent command out := new(bytes.Buffer) - err := GenReSTCustom(cmd, out) + err := GenMarkdownCustom(cmd, out) if err != nil { return err } // Generate children commands for _, cmdC := range cmd.Commands() { - err = GenReSTTreeCustom(cmdC, path+cmd.Name()) + err = GenMarkdownTreeCustom(cmdC, path+cmd.Name()) if err != nil { return err } } - err = config.WriteFile(path+cmd.Name()+"/index.rst", out.Bytes(), 0755) + err = config.WriteFile(path+cmd.Name()+"/index.md", out.Bytes(), 0755) if err != nil { return err } @@ -114,23 +113,16 @@ func printSubcommands(cmd *cobra.Command, buf *bytes.Buffer) { return } - var tree string + var subcommands string // Generate children commands for _, cmdC := range cmd.Commands() { if cmdC.Name() != "help" { - tree += fmt.Sprintf("%s <%s>\n", cmdC.Name(), cmdC.Name()) + subcommands += fmt.Sprintf("- [%s](%s.md)\n", cmdC.Name(), cmdC.Name()) } } - subcommands := "" - if tree != "" { - tree = utils.Indent(tree, " ") - subcommands = fmt.Sprintf(tocTree, tree) - } - if subcommands != "" { - buf.WriteString("Subcommands\n") - buf.WriteString("~~~~~~~~~~~\n") + buf.WriteString("### Subcommands\n\n") buf.WriteString(subcommands) buf.WriteString("\n") } @@ -141,21 +133,20 @@ func fatal(err error) { os.Exit(1) } -// adapted from : github.com/spf13/cobra/doc/rest_docs.go - -// GenReSTTreeCustom is the the same as GenReSTTree, but +// adapted from : github.com/spf13/cobra/blob/main/doc/md_docs.go +// GenMarkdownTreeCustom is the the same as GenMarkdownTree, but // with custom filePrepender and linkHandler. -func GenReSTTreeCustom(cmd *cobra.Command, dir string) error { +func GenMarkdownTreeCustom(cmd *cobra.Command, dir string) error { for _, c := range cmd.Commands() { if !c.IsAvailableCommand() || c.IsAdditionalHelpTopicCommand() { continue } - if err := GenReSTTreeCustom(c, dir); err != nil { + if err := GenMarkdownTreeCustom(c, dir); err != nil { return err } } - basename := cmd.Name() + ".rst" + basename := strings.ReplaceAll(cmd.Name(), " ", "_") + ".md" filename := filepath.Join(dir, basename) f, err := os.Create(filename) if err != nil { @@ -163,73 +154,62 @@ func GenReSTTreeCustom(cmd *cobra.Command, dir string) error { } defer f.Close() - if err := GenReSTCustom(cmd, f); err != nil { + if err := GenMarkdownCustom(cmd, f); err != nil { return err } return nil } -// GenReSTCustom creates custom reStructured Text output. -func GenReSTCustom(cmd *cobra.Command, w io.Writer) error { +// GenMarkdownCustom creates custom Markdown output. github.com/spf13/cobra/blob/main/doc/md_docs.go +func GenMarkdownCustom(cmd *cobra.Command, w io.Writer) error { cmd.InitDefaultHelpCmd() cmd.InitDefaultHelpFlag() buf := new(bytes.Buffer) name := cmd.CommandPath() - short := cmd.Short - long := cmd.Long - if long == "" { - long = short + buf.WriteString("## " + name + "\n\n") + buf.WriteString(cmd.Short + "\n\n") + if len(cmd.Long) > 0 { + buf.WriteString("### Synopsis\n\n") + buf.WriteString(cmd.Long + "\n\n") } - ref := strings.ReplaceAll(name, " ", "_") - - buf.WriteString(".. _" + ref + ":\n\n") - buf.WriteString(name + "\n") - buf.WriteString(strings.Repeat("-", len(name)) + "\n\n") - buf.WriteString(short + "\n\n") - buf.WriteString("Synopsis\n") - buf.WriteString("~~~~~~~~\n\n") - buf.WriteString("\n" + long + "\n\n") if cmd.Runnable() { - buf.WriteString(fmt.Sprintf("::\n\n %s\n\n", cmd.UseLine())) + buf.WriteString(fmt.Sprintf("```\n%s\n```\n\n", cmd.UseLine())) } if len(cmd.Example) > 0 { - buf.WriteString("Examples\n") - buf.WriteString("~~~~~~~~\n\n") - buf.WriteString(fmt.Sprintf("::\n\n%s\n\n", utils.Indent(cmd.Example, " "))) + buf.WriteString("### Examples\n\n") + buf.WriteString(fmt.Sprintf("```\n%s\n```\n\n", cmd.Example)) } - if err := printOptionsReST(buf, cmd, name); err != nil { + if err := printOptions(buf, cmd, name); err != nil { return err } printSubcommands(cmd, buf) - + _, err := buf.WriteTo(w) return err } -// adapted from : github.com/spf13/cobra/doc/rest_docs.go -func printOptionsReST(buf *bytes.Buffer, cmd *cobra.Command, name string) error { +// adapted from : github.com/spf13/cobra/blob/main/doc/md_docs.go +func printOptions(buf *bytes.Buffer, cmd *cobra.Command, name string) error { flags := cmd.NonInheritedFlags() flags.SetOutput(buf) if flags.HasAvailableFlags() { - buf.WriteString("Options\n") - buf.WriteString("~~~~~~~\n\n::\n\n") + buf.WriteString("### Options\n\n```\n") flags.PrintDefaults() - buf.WriteString("\n") + buf.WriteString("```\n\n") } parentFlags := cmd.InheritedFlags() parentFlags.SetOutput(buf) if parentFlags.HasAvailableFlags() { - buf.WriteString("Options inherited from parent commands\n") - buf.WriteString("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n") + buf.WriteString("### Options inherited from parent commands\n\n```\n") parentFlags.PrintDefaults() - buf.WriteString("\n") + buf.WriteString("```\n\n") } return nil } diff --git a/commands/version/version.go b/commands/version/version.go index 7c8d82e5e..c72bcf675 100644 --- a/commands/version/version.go +++ b/commands/version/version.go @@ -12,7 +12,7 @@ import ( func NewCmdVersion(s *iostreams.IOStreams, version, buildDate string) *cobra.Command { var versionCmd = &cobra.Command{ Use: "version", - Short: "show glab version information", + Short: "Show glab version information", Long: ``, Aliases: []string{"v"}, RunE: func(cmd *cobra.Command, args []string) error { diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index d0c3cbf10..000000000 --- a/docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = source -BUILDDIR = build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index 6247f7e23..000000000 --- a/docs/make.bat +++ /dev/null @@ -1,35 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=source -set BUILDDIR=build - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd diff --git a/docs/source/_static/glab.png b/docs/source/_static/glab.png deleted file mode 100644 index b350d4d9593d5f9e385c88fb65b9c432301d5dde..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17831 zcmeAS@N?(olHy`uVBq!ia0y~yV5(wZVEDqp#K6GN{8r``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w2fs#}f6?vP!w`wo^Z z7TP~&{rddE!i_H;Jb3UxP}%Lv>+AfAUw(ak{rUNMZ@ct&Z}yfijNKx(e^Gyb|BHns zxw*MjRaW1uwtJt`xqS3s9rri&OOly&K{sA8?c2A{IPFY9VPWFNh_7G2Mn*<1_n$v) zkK=oT>s$V)Hwv*bFsu^x)i|}Qbz`^G=C!DFh8gI20b#qNpZaK10 zdy#KC$XP1{dQ;^7@Oj2tZI?BhEh{CZ^|uzZJb#vH_O00TONZ8)*lSKKJGhDahQZ1e zlN~yl7#OZvT3N~2)%00VN-ObJIQS{`euU}WczP9$oi;T>Dwn|D$ zii(WiOQ+5MV!twf|KD$qj&{e!m=wM|tXC(%WyyIFRGlu6$T73l)?R&A**88uUR+#U zUtj;?e^H~vX)|VMtV__UT40rXYYU&So0q<_va+6@-<%_XUp#6a9qF_PQa3X(S+Z=| zrkig*KR@3+U$?rl^5@T=nyU^p{|HJ?P3>gU*`--tP*6}>Dr=S_@l$xR?4+0KN7FXT z+f+=LK3%=;hJcLBn+FdJQcg@*_jtu2e [flags] +``` + +### Options inherited from parent commands + +``` + --help Show help for command +``` + diff --git a/docs/source/alias/delete.rst b/docs/source/alias/delete.rst deleted file mode 100644 index eb4b03d60..000000000 --- a/docs/source/alias/delete.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. _glab_alias_delete: - -glab alias delete ------------------ - -Delete an alias. - -Synopsis -~~~~~~~~ - - -Delete an alias. - -:: - - glab alias delete [flags] - -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - --help Show help for command - diff --git a/docs/source/alias/help.md b/docs/source/alias/help.md new file mode 100644 index 000000000..e05f3d3da --- /dev/null +++ b/docs/source/alias/help.md @@ -0,0 +1,19 @@ +## glab alias help + +Help about any command + +### Synopsis + +Help provides help for any command in the application. +Simply type alias help [path to command] for full details. + +``` +glab alias help [command] [flags] +``` + +### Options inherited from parent commands + +``` + --help Show help for command +``` + diff --git a/docs/source/alias/help.rst b/docs/source/alias/help.rst deleted file mode 100644 index e3d17bb0c..000000000 --- a/docs/source/alias/help.rst +++ /dev/null @@ -1,25 +0,0 @@ -.. _glab_alias_help: - -glab alias help ---------------- - -Help about any command - -Synopsis -~~~~~~~~ - - -Help provides help for any command in the application. -Simply type alias help [path to command] for full details. - -:: - - glab alias help [command] [flags] - -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - --help Show help for command - diff --git a/docs/source/alias/index.md b/docs/source/alias/index.md new file mode 100755 index 000000000..dce762c84 --- /dev/null +++ b/docs/source/alias/index.md @@ -0,0 +1,16 @@ +## glab alias + +Create, list and delete aliases + +### Options inherited from parent commands + +``` + --help Show help for command +``` + +### Subcommands + +- [delete](delete.md) +- [list](list.md) +- [set](set.md) + diff --git a/docs/source/alias/index.rst b/docs/source/alias/index.rst deleted file mode 100755 index b4bf665c8..000000000 --- a/docs/source/alias/index.rst +++ /dev/null @@ -1,32 +0,0 @@ -.. _glab_alias: - -glab alias ----------- - -Create, list and delete aliases - -Synopsis -~~~~~~~~ - - -Create, list and delete aliases - -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - --help Show help for command - -Subcommands -~~~~~~~~~~~ -.. toctree:: - :glob: - :maxdepth: 0 - - delete - list - set - - - diff --git a/docs/source/alias/list.md b/docs/source/alias/list.md new file mode 100644 index 000000000..12dba6dbb --- /dev/null +++ b/docs/source/alias/list.md @@ -0,0 +1,14 @@ +## glab alias list + +List the available aliases. + +``` +glab alias list [flags] +``` + +### Options inherited from parent commands + +``` + --help Show help for command +``` + diff --git a/docs/source/alias/list.rst b/docs/source/alias/list.rst deleted file mode 100644 index 06145639a..000000000 --- a/docs/source/alias/list.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. _glab_alias_list: - -glab alias list ---------------- - -List the available aliases. - -Synopsis -~~~~~~~~ - - -List the available aliases. - -:: - - glab alias list [flags] - -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - --help Show help for command - diff --git a/docs/source/alias/set.rst b/docs/source/alias/set.md similarity index 60% rename from docs/source/alias/set.rst rename to docs/source/alias/set.md index 46e54888a..b29d91e14 100644 --- a/docs/source/alias/set.rst +++ b/docs/source/alias/set.md @@ -1,13 +1,8 @@ -.. _glab_alias_set: - -glab alias set --------------- +## glab alias set Set an alias. -Synopsis -~~~~~~~~ - +### Synopsis Declare a word as a command alias that will expand to the specified command(s). @@ -25,39 +20,36 @@ you have installed git on Windows in some other way, shell aliases may not work Quotes must always be used when defining a command as in the examples. -:: +``` +glab alias set '' [flags] +``` - glab alias set '' [flags] +### Examples -Examples -~~~~~~~~ +``` +$ glab alias set mrv 'mr view' +$ glab mrv -w 123 +#=> glab mr view -w 123 -:: +$ glab alias set createissue 'glab create issue --title "$1"' +$ glab createissue "My Issue" --description "Something is broken." +# => glab create issue --title "My Issue" --description "Something is broken." - $ glab alias set mrv 'mr view' - $ glab mrv -w 123 - #=> glab mr view -w 123 - - $ glab alias set createissue 'glab create issue --title "$1"' - $ glab createissue "My Issue" --description "Something is broken." - # => glab create issue --title "My Issue" --description "Something is broken." - - $ glab alias set --shell igrep 'glab issue list --assignee="$1" | grep $2' - $ glab igrep user foo - #=> glab issue list --assignee="user" | grep "foo" - +$ glab alias set --shell igrep 'glab issue list --assignee="$1" | grep $2' +$ glab igrep user foo +#=> glab issue list --assignee="user" | grep "foo" -Options -~~~~~~~ +``` -:: +### Options +``` -s, --shell Declare an alias to be passed through a shell interpreter +``` -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: +### Options inherited from parent commands +``` --help Show help for command +``` diff --git a/docs/source/api/index.rst b/docs/source/api/index.md similarity index 75% rename from docs/source/api/index.rst rename to docs/source/api/index.md index 40617a0d1..1acf0df97 100755 --- a/docs/source/api/index.rst +++ b/docs/source/api/index.md @@ -1,13 +1,8 @@ -.. _glab_api: - -glab api --------- +## glab api Make an authenticated request to GitLab API -Synopsis -~~~~~~~~ - +### Synopsis Makes an authenticated HTTP request to the GitLab API and prints the response. The endpoint argument should either be a path of a GitLab API v4 endpoint, or @@ -51,64 +46,61 @@ there are no more pages of results. For GraphQL requests, this requires that the original query accepts an '$endCursor: String' variable and that it fetches the 'pageInfo{ hasNextPage, endCursor }' set of fields from a collection. -:: +``` +glab api [flags] +``` - glab api [flags] +### Examples -Examples -~~~~~~~~ +``` +$ glab api projects/:fullpath/releases -:: +$ glab api projects/gitlab-com%2Fwww-gitlab-com/issues - $ glab api projects/:fullpath/releases - - $ glab api projects/gitlab-com%2Fwww-gitlab-com/issues - - $ glab api issues --paginate - - $ glab api graphql -f query=' - query { - project(fullPath: "gitlab-org/gitlab-docs") { - name - forksCount - statistics { - wikiSize - } - issuesEnabled - boards { - nodes { - id - name - } +$ glab api issues --paginate + +$ glab api graphql -f query=' + query { + project(fullPath: "gitlab-org/gitlab-docs") { + name + forksCount + statistics { + wikiSize + } + issuesEnabled + boards { + nodes { + id + name } } } - ' - - $ glab api graphql --paginate -f query=' - query($endCursor: String) { - project(fullPath: "gitlab-org/graphql-sandbox") { - name - issues(first: 2, after: $endCursor) { - edges { - node { - title - } - } - pageInfo { - endCursor - hasNextPage + } +' + +$ glab api graphql --paginate -f query=' + query($endCursor: String) { + project(fullPath: "gitlab-org/graphql-sandbox") { + name + issues(first: 2, after: $endCursor) { + edges { + node { + title } } + pageInfo { + endCursor + hasNextPage + } } - }' - + } + }' -Options -~~~~~~~ +``` -:: +### Options +``` -F, --field stringArray Add a parameter of inferred type -H, --header stringArray Add an additional HTTP request header --hostname string The GitLab hostname for the request (default is "gitlab.com" or authenticated host in current git directory) @@ -118,11 +110,11 @@ Options --paginate Make additional HTTP requests to fetch all pages of results -f, --raw-field stringArray Add a string parameter --silent Do not print the response body +``` -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: +### Options inherited from parent commands +``` --help Show help for command +``` diff --git a/docs/source/auth/git-credential.md b/docs/source/auth/git-credential.md new file mode 100644 index 000000000..fa6abdb0d --- /dev/null +++ b/docs/source/auth/git-credential.md @@ -0,0 +1,14 @@ +## glab auth git-credential + +Implements git credential helper manager + +``` +glab auth git-credential [flags] +``` + +### Options inherited from parent commands + +``` + --help Show help for command +``` + diff --git a/docs/source/auth/git-credential.rst b/docs/source/auth/git-credential.rst deleted file mode 100644 index 0dad2f72f..000000000 --- a/docs/source/auth/git-credential.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. _glab_auth_git-credential: - -glab auth git-credential ------------------------- - -Implements git credential helper manager - -Synopsis -~~~~~~~~ - - -Implements git credential helper manager - -:: - - glab auth git-credential [flags] - -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - --help Show help for command - diff --git a/docs/source/auth/help.md b/docs/source/auth/help.md new file mode 100644 index 000000000..5db62b6fa --- /dev/null +++ b/docs/source/auth/help.md @@ -0,0 +1,19 @@ +## glab auth help + +Help about any command + +### Synopsis + +Help provides help for any command in the application. +Simply type auth help [path to command] for full details. + +``` +glab auth help [command] [flags] +``` + +### Options inherited from parent commands + +``` + --help Show help for command +``` + diff --git a/docs/source/auth/help.rst b/docs/source/auth/help.rst deleted file mode 100644 index 949b77908..000000000 --- a/docs/source/auth/help.rst +++ /dev/null @@ -1,25 +0,0 @@ -.. _glab_auth_help: - -glab auth help --------------- - -Help about any command - -Synopsis -~~~~~~~~ - - -Help provides help for any command in the application. -Simply type auth help [path to command] for full details. - -:: - - glab auth help [command] [flags] - -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - --help Show help for command - diff --git a/docs/source/auth/index.md b/docs/source/auth/index.md new file mode 100755 index 000000000..24b646553 --- /dev/null +++ b/docs/source/auth/index.md @@ -0,0 +1,16 @@ +## glab auth + +Manage glab's authentication state + +### Options inherited from parent commands + +``` + --help Show help for command +``` + +### Subcommands + +- [git-credential](git-credential.md) +- [login](login.md) +- [status](status.md) + diff --git a/docs/source/auth/index.rst b/docs/source/auth/index.rst deleted file mode 100755 index 3677d8a63..000000000 --- a/docs/source/auth/index.rst +++ /dev/null @@ -1,32 +0,0 @@ -.. _glab_auth: - -glab auth ---------- - -Manage glab's authentication state - -Synopsis -~~~~~~~~ - - -Manage glab's authentication state - -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - --help Show help for command - -Subcommands -~~~~~~~~~~~ -.. toctree:: - :glob: - :maxdepth: 0 - - git-credential - login - status - - - diff --git a/docs/source/auth/login.md b/docs/source/auth/login.md new file mode 100644 index 000000000..2ece19e03 --- /dev/null +++ b/docs/source/auth/login.md @@ -0,0 +1,41 @@ +## glab auth login + +Authenticate with a GitLab instance + +### Synopsis + +Authenticate with a GitLab instance. +You can pass in a token on standard input by using `--stdin`. +The minimum required scopes for the token are: "api", "write_repository". + + +``` +glab auth login [flags] +``` + +### Examples + +``` +# start interactive setup +$ glab auth login +# authenticate against gitlab.com by reading the token from a file +$ glab auth login --stdin < myaccesstoken.txt +# authenticate with a self-hosted GitLab instance +$ glab auth login --hostname salsa.debian.org + +``` + +### Options + +``` + -h, --hostname string The hostname of the GitLab instance to authenticate with + --stdin Read token from standard input + -t, --token string Your GitLab access token +``` + +### Options inherited from parent commands + +``` + --help Show help for command +``` + diff --git a/docs/source/auth/login.rst b/docs/source/auth/login.rst deleted file mode 100644 index c0afa7f10..000000000 --- a/docs/source/auth/login.rst +++ /dev/null @@ -1,49 +0,0 @@ -.. _glab_auth_login: - -glab auth login ---------------- - -Authenticate with a GitLab instance - -Synopsis -~~~~~~~~ - - -Authenticate with a GitLab instance. -You can pass in a token on standard input by using `--stdin`. -The minimum required scopes for the token are: "api", "write_repository". - - -:: - - glab auth login [flags] - -Examples -~~~~~~~~ - -:: - - # start interactive setup - $ glab auth login - # authenticate against gitlab.com by reading the token from a file - $ glab auth login --stdin < myaccesstoken.txt - # authenticate with a self-hosted GitLab instance - $ glab auth login --hostname salsa.debian.org - - -Options -~~~~~~~ - -:: - - -h, --hostname string The hostname of the GitLab instance to authenticate with - --stdin Read token from standard input - -t, --token string Your GitLab access token - -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - --help Show help for command - diff --git a/docs/source/auth/status.rst b/docs/source/auth/status.md similarity index 64% rename from docs/source/auth/status.rst rename to docs/source/auth/status.md index 325ac2fb7..8f7ba270d 100644 --- a/docs/source/auth/status.rst +++ b/docs/source/auth/status.md @@ -1,35 +1,28 @@ -.. _glab_auth_status: - -glab auth status ----------------- +## glab auth status View authentication status -Synopsis -~~~~~~~~ - +### Synopsis Verifies and displays information about your authentication state. This command tests the authentication states of all known GitLab instances in the config file and reports issues if any -:: - - glab auth status [flags] +``` +glab auth status [flags] +``` -Options -~~~~~~~ - -:: +### Options +``` -h, --hostname string Check a specific instance's authentication status -t, --show-token Display the auth token +``` -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: +### Options inherited from parent commands +``` --help Show help for command +``` diff --git a/docs/source/check-update/index.md b/docs/source/check-update/index.md new file mode 100755 index 000000000..b0cd013cf --- /dev/null +++ b/docs/source/check-update/index.md @@ -0,0 +1,14 @@ +## glab check-update + +Check for latest glab releases + +``` +glab check-update [flags] +``` + +### Options inherited from parent commands + +``` + --help Show help for command +``` + diff --git a/docs/source/check-update/index.rst b/docs/source/check-update/index.rst deleted file mode 100755 index 5a2808607..000000000 --- a/docs/source/check-update/index.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. _glab_check-update: - -glab check-update ------------------ - -Check for latest glab releases - -Synopsis -~~~~~~~~ - - -Check for latest glab releases - -:: - - glab check-update [flags] - -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - --help Show help for command - diff --git a/docs/source/ci/artifact.md b/docs/source/ci/artifact.md new file mode 100644 index 000000000..082c7389e --- /dev/null +++ b/docs/source/ci/artifact.md @@ -0,0 +1,29 @@ +## glab ci artifact + +Download all Artifacts from the last pipeline + +``` +glab ci artifact [flags] +``` + +### Examples + +``` +$ glab ci artifact main build +$ glab ci artifact main deploy --path="artifacts/" + +``` + +### Options + +``` + -p, --path string Path to download the Artifact files (default ./) +``` + +### Options inherited from parent commands + +``` + --help Show help for command + -R, --repo OWNER/REPO Select another repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format or full URL or git URL +``` + diff --git a/docs/source/ci/ci.md b/docs/source/ci/ci.md new file mode 100644 index 000000000..a89f41c5b --- /dev/null +++ b/docs/source/ci/ci.md @@ -0,0 +1,24 @@ +## glab ci ci + +Work with GitLab CI pipelines and jobs + +### Examples + +``` +$ glab pipeline ci trace + +``` + +### Options inherited from parent commands + +``` + --help Show help for command + -R, --repo OWNER/REPO Select another repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format or full URL or git URL +``` + +### Subcommands + +- [lint](lint.md) +- [trace](trace.md) +- [view](view.md) + diff --git a/docs/source/ci/ci.rst b/docs/source/ci/ci.rst deleted file mode 100644 index 4b5da02e1..000000000 --- a/docs/source/ci/ci.rst +++ /dev/null @@ -1,41 +0,0 @@ -.. _glab_ci_ci: - -glab ci ci ----------- - -Work with GitLab CI pipelines and jobs - -Synopsis -~~~~~~~~ - - -Work with GitLab CI pipelines and jobs - -Examples -~~~~~~~~ - -:: - - $ glab pipeline ci trace - - -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - --help Show help for command - -R, --repo OWNER/REPO Select another repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format or full URL or git URL - -Subcommands -~~~~~~~~~~~ -.. toctree:: - :glob: - :maxdepth: 0 - - lint - trace - view - - - diff --git a/docs/source/ci/delete.rst b/docs/source/ci/delete.md similarity index 51% rename from docs/source/ci/delete.rst rename to docs/source/ci/delete.md index 84c265860..60298c2c8 100644 --- a/docs/source/ci/delete.rst +++ b/docs/source/ci/delete.md @@ -1,41 +1,29 @@ -.. _glab_ci_delete: - -glab ci delete --------------- - -Delete a CI pipeline - -Synopsis -~~~~~~~~ - +## glab ci delete Delete a CI pipeline -:: - - glab ci delete [flags] +``` +glab ci delete [flags] +``` -Examples -~~~~~~~~ +### Examples -:: +``` +$ glab ci delete 34 +$ glab ci delete 12,34,2 - $ glab ci delete 34 - $ glab ci delete 12,34,2 - +``` -Options -~~~~~~~ - -:: +### Options +``` -s, --status string delete pipelines by status: {running|pending|success|failed|canceled|skipped|created|manual} +``` -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: +### Options inherited from parent commands +``` --help Show help for command -R, --repo OWNER/REPO Select another repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format or full URL or git URL +``` diff --git a/docs/source/ci/help.rst b/docs/source/ci/help.md similarity index 63% rename from docs/source/ci/help.rst rename to docs/source/ci/help.md index 1f859f16b..7ef56f1c9 100644 --- a/docs/source/ci/help.rst +++ b/docs/source/ci/help.md @@ -1,26 +1,20 @@ -.. _glab_ci_help: - -glab ci help ------------- +## glab ci help Help about any command -Synopsis -~~~~~~~~ - +### Synopsis Help provides help for any command in the application. Simply type ci help [path to command] for full details. -:: - - glab ci help [command] [flags] - -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +``` +glab ci help [command] [flags] +``` -:: +### Options inherited from parent commands +``` --help Show help for command -R, --repo OWNER/REPO Select another repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format or full URL or git URL +``` diff --git a/docs/source/ci/index.md b/docs/source/ci/index.md new file mode 100755 index 000000000..f1399c46c --- /dev/null +++ b/docs/source/ci/index.md @@ -0,0 +1,29 @@ +## glab ci + +Work with GitLab CI pipelines and jobs + +### Options + +``` + -R, --repo OWNER/REPO Select another repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format or full URL or git URL +``` + +### Options inherited from parent commands + +``` + --help Show help for command +``` + +### Subcommands + +- [artifact](artifact.md) +- [ci](ci.md) +- [delete](delete.md) +- [lint](lint.md) +- [list](list.md) +- [retry](retry.md) +- [run](run.md) +- [status](status.md) +- [trace](trace.md) +- [view](view.md) + diff --git a/docs/source/ci/index.rst b/docs/source/ci/index.rst deleted file mode 100755 index 588019f67..000000000 --- a/docs/source/ci/index.rst +++ /dev/null @@ -1,45 +0,0 @@ -.. _glab_ci: - -glab ci -------- - -Work with GitLab CI pipelines and jobs - -Synopsis -~~~~~~~~ - - -Work with GitLab CI pipelines and jobs - -Options -~~~~~~~ - -:: - - -R, --repo OWNER/REPO Select another repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format or full URL or git URL - -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - --help Show help for command - -Subcommands -~~~~~~~~~~~ -.. toctree:: - :glob: - :maxdepth: 0 - - ci - delete - lint - list - retry - run - status - trace - view - - - diff --git a/docs/source/ci/lint.md b/docs/source/ci/lint.md new file mode 100644 index 000000000..c34a26e7c --- /dev/null +++ b/docs/source/ci/lint.md @@ -0,0 +1,27 @@ +## glab ci lint + +Checks if your .gitlab-ci.yml file is valid. + +``` +glab ci lint [flags] +``` + +### Examples + +``` +$ glab ci lint +#=> Uses .gitlab-ci.yml in the current directory + +$ glab ci lint .gitlab-ci.yml + +$ glab ci lint path/to/.gitlab-ci.yml + +``` + +### Options inherited from parent commands + +``` + --help Show help for command + -R, --repo OWNER/REPO Select another repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format or full URL or git URL +``` + diff --git a/docs/source/ci/lint.rst b/docs/source/ci/lint.rst deleted file mode 100644 index e89f8c41b..000000000 --- a/docs/source/ci/lint.rst +++ /dev/null @@ -1,38 +0,0 @@ -.. _glab_ci_lint: - -glab ci lint ------------- - -Checks if your .gitlab-ci.yml file is valid. - -Synopsis -~~~~~~~~ - - -Checks if your .gitlab-ci.yml file is valid. - -:: - - glab ci lint [flags] - -Examples -~~~~~~~~ - -:: - - $ glab ci lint - #=> Uses .gitlab-ci.yml in the current directory - - $ glab ci lint .gitlab-ci.yml - - $ glab ci lint path/to/.gitlab-ci.yml - - -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - --help Show help for command - -R, --repo OWNER/REPO Select another repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format or full URL or git URL - diff --git a/docs/source/ci/list.rst b/docs/source/ci/list.md similarity index 67% rename from docs/source/ci/list.rst rename to docs/source/ci/list.md index 643ac44a3..3b0bc0d89 100644 --- a/docs/source/ci/list.rst +++ b/docs/source/ci/list.md @@ -1,45 +1,33 @@ -.. _glab_ci_list: - -glab ci list ------------- - -Get the list of CI pipelines - -Synopsis -~~~~~~~~ - +## glab ci list Get the list of CI pipelines -:: - - glab ci list [flags] +``` +glab ci list [flags] +``` -Examples -~~~~~~~~ +### Examples -:: +``` +$ glab ci list +$ glab ci list --status=failed - $ glab ci list - $ glab ci list --state=failed - +``` -Options -~~~~~~~ - -:: +### Options +``` -o, --orderBy string Order pipeline by -p, --page int Page number (default 1) -P, --per-page int Number of items to list per page. (default 30) (default 30) --sort string Sort pipeline by {asc|desc}. (Defaults to desc) (default "desc") -s, --status string Get pipeline with status: {running|pending|success|failed|canceled|skipped|created|manual} +``` -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: +### Options inherited from parent commands +``` --help Show help for command -R, --repo OWNER/REPO Select another repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format or full URL or git URL +``` diff --git a/docs/source/ci/retry.md b/docs/source/ci/retry.md new file mode 100644 index 000000000..eeab57e18 --- /dev/null +++ b/docs/source/ci/retry.md @@ -0,0 +1,22 @@ +## glab ci retry + +Retry a CI job + +``` +glab ci retry [flags] +``` + +### Examples + +``` +$ glab ci retry 871528 + +``` + +### Options inherited from parent commands + +``` + --help Show help for command + -R, --repo OWNER/REPO Select another repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format or full URL or git URL +``` + diff --git a/docs/source/ci/retry.rst b/docs/source/ci/retry.rst deleted file mode 100644 index 2be3c2f1f..000000000 --- a/docs/source/ci/retry.rst +++ /dev/null @@ -1,33 +0,0 @@ -.. _glab_ci_retry: - -glab ci retry -------------- - -Retry a CI job - -Synopsis -~~~~~~~~ - - -Retry a CI job - -:: - - glab ci retry [flags] - -Examples -~~~~~~~~ - -:: - - $ glab ci retry 871528 - - -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - --help Show help for command - -R, --repo OWNER/REPO Select another repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format or full URL or git URL - diff --git a/docs/source/ci/run.md b/docs/source/ci/run.md new file mode 100644 index 000000000..8fb8730e1 --- /dev/null +++ b/docs/source/ci/run.md @@ -0,0 +1,32 @@ +## glab ci run + +Create or run a new CI pipeline + +``` +glab ci run [flags] +``` + +### Examples + +``` +$ glab ci run +$ glab ci run -b main +$ glab ci run -b main --variables MYKEY:some_value + $ glab ci run -b main --variables MYKEY:some_value --variables KEY2:another_value + +``` + +### Options + +``` + -b, --branch string Create pipeline on branch/ref + --variables strings Pass variables to pipeline +``` + +### Options inherited from parent commands + +``` + --help Show help for command + -R, --repo OWNER/REPO Select another repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format or full URL or git URL +``` + diff --git a/docs/source/ci/run.rst b/docs/source/ci/run.rst deleted file mode 100644 index 07288fcb9..000000000 --- a/docs/source/ci/run.rst +++ /dev/null @@ -1,44 +0,0 @@ -.. _glab_ci_run: - -glab ci run ------------ - -Create or run a new CI pipeline - -Synopsis -~~~~~~~~ - - -Create or run a new CI pipeline - -:: - - glab ci run [flags] - -Examples -~~~~~~~~ - -:: - - $ glab ci run - $ glab ci run -b main - $ glab ci run -b main --variables MYKEY:some_value - $ glab ci run -b main --variables MYKEY:some_value --variables KEY2:another_value - - -Options -~~~~~~~ - -:: - - -b, --branch string Create pipeline on branch/ref - --variables strings Pass variables to pipeline - -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - --help Show help for command - -R, --repo OWNER/REPO Select another repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format or full URL or git URL - diff --git a/docs/source/ci/status.md b/docs/source/ci/status.md new file mode 100644 index 000000000..4d65a1c2b --- /dev/null +++ b/docs/source/ci/status.md @@ -0,0 +1,33 @@ +## glab ci status + +View a running CI pipeline on current or other branch specified + +``` +glab ci status [flags] +``` + +### Examples + +``` +$ glab ci status --live +$ glab ci status --compact // more compact view +$ glab ci status --branch=master // Get pipeline for master branch +$ glab ci status // Get pipeline for current branch + +``` + +### Options + +``` + -b, --branch string Check pipeline status for a branch. (Default is current branch) + -c, --compact Show status in compact format + -l, --live Show status in real-time till pipeline ends +``` + +### Options inherited from parent commands + +``` + --help Show help for command + -R, --repo OWNER/REPO Select another repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format or full URL or git URL +``` + diff --git a/docs/source/ci/status.rst b/docs/source/ci/status.rst deleted file mode 100644 index a0640f6d7..000000000 --- a/docs/source/ci/status.rst +++ /dev/null @@ -1,45 +0,0 @@ -.. _glab_ci_status: - -glab ci status --------------- - -View a running CI pipeline on current or other branch specified - -Synopsis -~~~~~~~~ - - -View a running CI pipeline on current or other branch specified - -:: - - glab ci status [flags] - -Examples -~~~~~~~~ - -:: - - $ glab ci status --live - $ glab ci status --compact // more compact view - $ glab ci status --branch=master // Get pipeline for master branch - $ glab ci status // Get pipeline for current branch - - -Options -~~~~~~~ - -:: - - -b, --branch string Check pipeline status for a branch. (Default is current branch) - -c, --compact Show status in compact format - -l, --live Show status in real-time till pipeline ends - -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - --help Show help for command - -R, --repo OWNER/REPO Select another repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format or full URL or git URL - diff --git a/docs/source/ci/trace.md b/docs/source/ci/trace.md new file mode 100644 index 000000000..ffb88e903 --- /dev/null +++ b/docs/source/ci/trace.md @@ -0,0 +1,32 @@ +## glab ci trace + +Trace a CI job log in real time + +``` +glab ci trace [] [flags] +``` + +### Examples + +``` +$ glab ci trace +#=> interactively select a job to trace + +$ glab ci trace 224356863 +#=> trace job with id 224356863 + +``` + +### Options + +``` + -b, --branch string Check pipeline status for a branch. (Default is the current branch) +``` + +### Options inherited from parent commands + +``` + --help Show help for command + -R, --repo OWNER/REPO Select another repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format or full URL or git URL +``` + diff --git a/docs/source/ci/trace.rst b/docs/source/ci/trace.rst deleted file mode 100644 index df5e0113c..000000000 --- a/docs/source/ci/trace.rst +++ /dev/null @@ -1,44 +0,0 @@ -.. _glab_ci_trace: - -glab ci trace -------------- - -Trace a CI job log in real time - -Synopsis -~~~~~~~~ - - -Trace a CI job log in real time - -:: - - glab ci trace [] [flags] - -Examples -~~~~~~~~ - -:: - - $ glab ci trace - #=> interactively select a job to trace - - $ glab ci trace 224356863 - #=> trace job with id 224356863 - - -Options -~~~~~~~ - -:: - - -b, --branch string Check pipeline status for a branch. (Default is the current branch) - -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - --help Show help for command - -R, --repo OWNER/REPO Select another repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format or full URL or git URL - diff --git a/docs/source/ci/view.rst b/docs/source/ci/view.md similarity index 61% rename from docs/source/ci/view.rst rename to docs/source/ci/view.md index 77f80263d..093ea51a9 100644 --- a/docs/source/ci/view.rst +++ b/docs/source/ci/view.md @@ -1,13 +1,8 @@ -.. _glab_ci_view: - -glab ci view ------------- +## glab ci view View, run, trace/logs, and cancel CI jobs current pipeline -Synopsis -~~~~~~~~ - +### Synopsis Supports viewing, running, tracing, and canceling jobs. @@ -21,33 +16,30 @@ Use arrow keys to navigate jobs and logs. Supports vi style (hjkl,Gg) bindings and arrow keys for navigating jobs and logs. -:: - - glab ci view [branch/tag] [flags] +``` +glab ci view [branch/tag] [flags] +``` -Examples -~~~~~~~~ +### Examples -:: +``` +$ glab pipeline ci view # Uses current branch +$ glab pipeline ci view master # Get latest pipeline on master branch +$ glab pipeline ci view -b master # just like the second example +$ glab pipeline ci view -b master -R profclems/glab # Get latest pipeline on master branch of profclems/glab repo - $ glab pipeline ci view # Uses current branch - $ glab pipeline ci view master # Get latest pipeline on master branch - $ glab pipeline ci view -b master # just like the second example - $ glab pipeline ci view -b master -R profclems/glab # Get latest pipeline on master branch of profclems/glab repo - +``` -Options -~~~~~~~ - -:: +### Options +``` -b, --branch string Check pipeline status for a branch/tag. (Default is the current branch) +``` -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: +### Options inherited from parent commands +``` --help Show help for command -R, --repo OWNER/REPO Select another repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format or full URL or git URL +``` diff --git a/docs/source/completion/index.rst b/docs/source/completion/index.md similarity index 71% rename from docs/source/completion/index.rst rename to docs/source/completion/index.md index e228d5984..7a83c2fdd 100755 --- a/docs/source/completion/index.rst +++ b/docs/source/completion/index.md @@ -1,13 +1,8 @@ -.. _glab_completion: - -glab completion ---------------- +## glab completion Generate shell completion scripts -Synopsis -~~~~~~~~ - +### Synopsis Generate shell completion scripts for glab commands. @@ -18,8 +13,8 @@ For example, for bash you could add this to your '~/.bash_profile': eval "$(glab completion -s bash)" -Generate a %[1]s_gh%[1]s completion script and put it somewhere in your %[1]s$fpath%[1]s: - gh completion -s zsh > /usr/local/share/zsh/site-functions/_gh +Generate a %[1]s_glab%[1]s completion script and put it somewhere in your %[1]s$fpath%[1]s: + glab completion -s zsh > /usr/local/share/zsh/site-functions/_glab Ensure that the following is present in your %[1]s~/.zshrc%[1]s: autoload -U compinit compinit -i @@ -31,22 +26,20 @@ no additional shell configuration is necessary to gain completion support. For Homebrew, see -:: - - glab completion [flags] +``` +glab completion [flags] +``` -Options -~~~~~~~ - -:: +### Options +``` --no-desc Do not include shell completion description -s, --shell string Shell type: {bash|zsh|fish|powershell} (default "bash") +``` -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: +### Options inherited from parent commands +``` --help Show help for command +``` diff --git a/docs/source/conf.py b/docs/source/conf.py deleted file mode 100644 index 54ad5694d..000000000 --- a/docs/source/conf.py +++ /dev/null @@ -1,72 +0,0 @@ -# Configuration file for the Sphinx documentation builder. -# -# This file only contains a selection of the most common options. For a full -# list see the documentation: -# https://www.sphinx-doc.org/en/master/usage/configuration.html - -# -- Path setup -------------------------------------------------------------- - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) -import sphinx_rtd_theme - -# -- Project information ----------------------------------------------------- - -project = 'GLab' -copyright = '2020, Clement Sam' -author = 'Clement Sam and contributors' - -# -- General configuration --------------------------------------------------- - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - "sphinx_rtd_theme", -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. -exclude_patterns = [] - -# -- Options for HTML output ------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -# html_theme = 'alabaster' -html_theme = "sphinx_rtd_theme" - -html_theme_options = { - 'canonical_url': '', - 'analytics_id': '', # Provided by Google in your dashboard - 'logo_only': True, - 'display_version': True, - 'prev_next_buttons_location': 'bottom', - 'style_external_links': True, - 'style_nav_header_background': 'white', - # Toc options - 'collapse_navigation': True, - 'sticky_navigation': True, - # 'navigation_depth': 4, - 'includehidden': True, - 'titles_only': False, -} - -html_logo = "_static/glab.png" -html_show_sourcelink = True -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -master_doc = 'index' diff --git a/docs/source/config/get.rst b/docs/source/config/get.md similarity index 51% rename from docs/source/config/get.rst rename to docs/source/config/get.md index 639d4c49a..1a9f618b6 100644 --- a/docs/source/config/get.rst +++ b/docs/source/config/get.md @@ -1,44 +1,36 @@ -.. _glab_config_get: - -glab config get ---------------- +## glab config get Prints the value of a given configuration key -Synopsis -~~~~~~~~ - +### Synopsis Get the value for a given configuration key. -:: +``` +glab config get [flags] +``` - glab config get [flags] +### Examples -Examples -~~~~~~~~ +``` -:: + $ glab config get editor + vim + $ glab config get glamour_style + notty - - $ glab config get editor - vim - $ glab config get glamour_style - notty - +``` -Options -~~~~~~~ - -:: +### Options +``` -g, --global Read from global config file (~/.config/glab-cli/config.yml). [Default: looks through Environment variables → Local → Global] -h, --host string Get per-host setting +``` -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: +### Options inherited from parent commands +``` --help Show help for command +``` diff --git a/docs/source/config/help.md b/docs/source/config/help.md new file mode 100644 index 000000000..9b212a4ee --- /dev/null +++ b/docs/source/config/help.md @@ -0,0 +1,19 @@ +## glab config help + +Help about any command + +### Synopsis + +Help provides help for any command in the application. +Simply type config help [path to command] for full details. + +``` +glab config help [command] [flags] +``` + +### Options inherited from parent commands + +``` + --help Show help for command +``` + diff --git a/docs/source/config/help.rst b/docs/source/config/help.rst deleted file mode 100644 index b195dd36d..000000000 --- a/docs/source/config/help.rst +++ /dev/null @@ -1,25 +0,0 @@ -.. _glab_config_help: - -glab config help ----------------- - -Help about any command - -Synopsis -~~~~~~~~ - - -Help provides help for any command in the application. -Simply type config help [path to command] for full details. - -:: - - glab config help [command] [flags] - -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - --help Show help for command - diff --git a/docs/source/config/index.rst b/docs/source/config/index.md similarity index 71% rename from docs/source/config/index.rst rename to docs/source/config/index.md index 29e9a18b9..963b11ff2 100755 --- a/docs/source/config/index.rst +++ b/docs/source/config/index.md @@ -1,13 +1,8 @@ -.. _glab_config: - -glab config ------------ +## glab config Set and get glab settings -Synopsis -~~~~~~~~ - +### Synopsis Get and set key/value strings. @@ -19,31 +14,24 @@ Current respected settings: - editor: if unset, defaults to environment variables. - visual: alternative for editor. if unset, defaults to environment variables. - glamour_style: Your desired markdown renderer style. Options are dark, light, notty. Custom styles are allowed set a custom style https://github.com/charmbracelet/glamour#styles +- glab_pager: Your desired pager command to use (e.g. less -R) -Options -~~~~~~~ - -:: +### Options +``` -g, --global use global config file +``` -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: +### Options inherited from parent commands +``` --help Show help for command +``` -Subcommands -~~~~~~~~~~~ -.. toctree:: - :glob: - :maxdepth: 0 - - get - init - set - +### Subcommands +- [get](get.md) +- [init](init.md) +- [set](set.md) diff --git a/docs/source/config/init.rst b/docs/source/config/init.md similarity index 56% rename from docs/source/config/init.rst rename to docs/source/config/init.md index 7943e86d7..9c9f86f7f 100644 --- a/docs/source/config/init.rst +++ b/docs/source/config/init.md @@ -1,13 +1,8 @@ -.. _glab_config_init: - -glab config init ----------------- +## glab config init Shows a prompt to set basic glab configuration -Synopsis -~~~~~~~~ - +### Synopsis Update the configuration by setting a key to a value. Examples: @@ -15,14 +10,13 @@ Examples: ? Enter default Gitlab Host (Current Value: https://gitlab.com): | -:: - - glab config init [flags] - -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +``` +glab config init [flags] +``` -:: +### Options inherited from parent commands +``` --help Show help for command +``` diff --git a/docs/source/config/set.rst b/docs/source/config/set.md similarity index 58% rename from docs/source/config/set.rst rename to docs/source/config/set.md index 33d638b12..0862c64d0 100644 --- a/docs/source/config/set.rst +++ b/docs/source/config/set.md @@ -1,45 +1,37 @@ -.. _glab_config_set: - -glab config set ---------------- +## glab config set Updates configuration with the value of a given key -Synopsis -~~~~~~~~ - +### Synopsis Update the configuration by setting a key to a value. Use glab config set --global if you want to set a global config. Specifying the --hostname flag also saves in the global config file -:: +``` +glab config set [flags] +``` - glab config set [flags] +### Examples -Examples -~~~~~~~~ +``` -:: + $ glab config set editor vim + $ glab config set token xxxxx -h gitlab.com - - $ glab config set editor vim - $ glab config set token xxxxx -h gitlab.com - +``` -Options -~~~~~~~ - -:: +### Options +``` -g, --global write to global ~/.config/glab-cli/config.yml file rather than the repository .glab-cli/config/config -h, --host string Set per-host setting +``` -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: +### Options inherited from parent commands +``` --help Show help for command +``` diff --git a/docs/source/index.md b/docs/source/index.md new file mode 100644 index 000000000..9787922cc --- /dev/null +++ b/docs/source/index.md @@ -0,0 +1,48 @@ +# GLab - A GitLab CLI Tool + +GLab is an open source Gitlab Cli tool written in Go (golang) to help +work seamlessly with Gitlab from the command line. Work with issues, +merge requests, **watch running pipelines directly from your CLI** among +other features. + +## Usage + +``` +glab [flags] +``` + +## Core Commands + + +- ``glab mr [list, create, close, reopen, delete, ...]`` +- ``glab issue [list, create, close, reopen, delete, ...]`` +- ``glab pipeline [list, delete, ci status, ci view, ...]`` +- ``glab release`` +- ``glab repo`` +- ``glab label`` +- ``glab alias`` + +### Examples + +``` +$ glab auth login --stdin < token.txt +$ glab issue list +$ glab mr for 123 # Create merge request for issue 123 +$ glab mr checkout 243 +$ glab pipeline ci view +$ glab mr view +$ glab mr approve +$ glab mr merge +``` + +## Installation + +You can find installation instructions on our [README](https://gitlab.com/gitlab-org/cli/#installation). + +## Authentication + +Run `glab auth login` to authenticate with your GitLab account. `glab` will respect tokens set using `GITLAB_TOKEN`. + +### Feedback + +Thank you for checking out GLab! Please open an [issue](https://gitlab.com/gitlab-org/cli/issues/new). to send us feedback. We're looking forward to hearing it. diff --git a/docs/source/index.rst b/docs/source/index.rst deleted file mode 100644 index aa5911ac1..000000000 --- a/docs/source/index.rst +++ /dev/null @@ -1,27 +0,0 @@ -.. include:: ./intro.rst - -.. toctree:: - :hidden: - :glob: - :maxdepth: 1 - - Getting started - -.. toctree:: - :hidden: - :glob: - :maxdepth: 2 - :caption: Commands - - alias - auth - check-update - completion - config - issue - label