mirror of https://gitlab.com/gitlab-org/cli.git
feat(docs): Add aliases to gen-docs
This commit is contained in:
parent
6765e45a3e
commit
0534f1b02d
|
@ -217,6 +217,11 @@ func GenMarkdownCustom(cmd *cobra.Command, w io.Writer) error {
|
|||
buf.WriteString(fmt.Sprintf("\n```plaintext\n%s\n```\n", cmd.UseLine()))
|
||||
}
|
||||
|
||||
if len(cmd.Aliases) > 0 {
|
||||
buf.WriteString("\n## Aliases\n\n")
|
||||
buf.WriteString(fmt.Sprintf("```plaintext\n%s\n```\n", strings.Join(cmd.Aliases, "\n")))
|
||||
}
|
||||
|
||||
if len(cmd.Example) > 0 {
|
||||
buf.WriteString("\n## Examples\n\n")
|
||||
buf.WriteString(fmt.Sprintf("```plaintext\n%s\n```\n", cmd.Example))
|
||||
|
|
|
@ -17,6 +17,12 @@ Check for latest glab releases
|
|||
glab check-update [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
update
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Download all artifacts from the last pipeline
|
|||
glab ci artifact <refName> <jobName> [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
push
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Get JSON of a running CI/CD pipeline on the current or other specified branch
|
|||
glab ci get [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
stats
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -13,6 +13,13 @@ Please do not edit this file directly. Run `make gen-docs` instead.
|
|||
|
||||
Work with GitLab CI/CD pipelines and jobs
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
pipe
|
||||
pipeline
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Create or run a new CI/CD pipeline
|
|||
glab ci run [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
create
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ View a running CI/CD pipeline on current or other branch specified
|
|||
glab ci status [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
stats
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -27,6 +27,12 @@ Current respected settings:
|
|||
- glamour_style: Your desired Markdown renderer style. Options are dark, light, notty. Custom styles are allowed using [glamour](https://github.com/charmbracelet/glamour#styles)
|
||||
- glab_pager: Your desired pager command to use (e.g. less -R)
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
conf
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ List project incidents
|
|||
glab incident list [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
ls
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Display the title, body, and other information about an incident.
|
|||
glab incident view <id> [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
show
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Create a project issue board.
|
|||
glab issue board create [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
new
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Create an issue
|
|||
glab issue create [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
new
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Delete an issue
|
|||
glab issue delete <id> [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
del
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ List project issues
|
|||
glab issue list [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
ls
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Add a comment or note to an issue on GitLab
|
|||
glab issue note <issue-id> [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
comment
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Reopen a closed issue
|
|||
glab issue reopen <id> [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
open
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Subscribe to an issue
|
|||
glab issue subscribe <id> [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
sub
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Unsubscribe to an issue
|
|||
glab issue unsubscribe <id> [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
unsub
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Display the title, body, and other information about an issue.
|
|||
glab issue view <id> [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
show
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Create labels for repository/project
|
|||
glab label create [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
new
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ List labels in repository
|
|||
glab label list [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
ls
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Create new merge request
|
|||
glab mr create [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
new
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Delete merge requests
|
|||
glab mr delete [<id> | <branch>] [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
del
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,14 @@ Create new merge request for an issue
|
|||
glab mr for [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
new-for
|
||||
create-for
|
||||
for-issue
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Get issues related to a particular merge request.
|
|||
glab mr issues [<id> | <branch>] [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
issue
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ List merge requests
|
|||
glab mr list [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
ls
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Merge/Accept merge requests
|
|||
glab mr merge {<id> | <branch>} [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
accept
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Add a comment or note to merge request
|
|||
glab mr note [<id> | <branch>] [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
comment
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Reopen merge requests
|
|||
glab mr reopen [<id>... | <branch>...] [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
open
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Revoke approval on a merge request
|
|||
glab mr revoke [<id> | <branch>] [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
unapprove
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Subscribe to merge requests
|
|||
glab mr subscribe [<id> | <branch>] [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
sub
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Add a to-do item to merge request
|
|||
glab mr todo [<id> | <branch>] [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
add-todo
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Unsubscribe from merge requests
|
|||
glab mr unsubscribe [<id> | <branch>] [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
unsub
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Display the title, body, and other information about a merge request.
|
|||
glab mr view {<id> | <branch>} [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
show
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ List releases in a repository
|
|||
glab release list [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
ls
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Get repository contributors list.
|
|||
glab repo contributors [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
users
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -13,6 +13,12 @@ Please do not edit this file directly. Run `make gen-docs` instead.
|
|||
|
||||
Work with GitLab repositories and projects
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
project
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Get list of repositories.
|
|||
glab repo list [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
users
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,13 @@ Search for GitLab repositories and projects by name
|
|||
glab repo search [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
find
|
||||
lookup
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -13,6 +13,13 @@ Please do not edit this file directly. Run `make gen-docs` instead.
|
|||
|
||||
Work with GitLab CI schedules
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
sched
|
||||
skd
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Create new snippet
|
|||
glab snippet create [path] [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
new
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Delete a project or group variable
|
|||
glab variable delete <key> [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
remove
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Export project or group variables.
|
|||
glab variable export [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
ex
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -13,6 +13,12 @@ Please do not edit this file directly. Run `make gen-docs` instead.
|
|||
|
||||
Manage GitLab Project and Group Variables
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
var
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ List project or group variables
|
|||
glab variable list [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
ls
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,13 @@ Create a new project or group variable
|
|||
glab variable set <key> <value> [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
new
|
||||
create
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -17,6 +17,12 @@ Show glab version information
|
|||
glab version [flags]
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
```plaintext
|
||||
v
|
||||
```
|
||||
|
||||
## Options inherited from parent commands
|
||||
|
||||
```plaintext
|
||||
|
|
Loading…
Reference in New Issue