gh*, glab*: standardize documentation (#7957)

This commit is contained in:
Reinhart Previano Koentjoro
2022-05-02 17:55:38 +07:00
committed by GitHub
parent e897720058
commit 6ed9681dbc
10 changed files with 43 additions and 26 deletions

View File

@@ -3,11 +3,15 @@
> Manage GitHub issues from the command-line.
> More information: <https://cli.github.com/manual/gh_issue>.
- Print out the issue:
- Display a specific issue:
`gh issue view {{issue_number}}`
- Create a new issue in the web browser:
- Display a specific issue in the default web browser:
`gh issue view {{issue_number}} --web`
- Create a new issue in the default web browser:
`gh issue create --web`
@@ -23,6 +27,6 @@
`gh issue status --repo {{owner}}/{{repository}}`
- Reopen an issue:
- Reopen a specific issue:
`gh issue reopen {{issue_number}}`

View File

@@ -19,6 +19,6 @@
`gh pr create --base {{base_branch}} --title "{{title}}" --body "{{body}}"`
- Start opening a pull request in the browser:
- Start opening a pull request in the default web browser:
`gh pr create --web`

View File

@@ -7,15 +7,15 @@
`gh pr create`
- Check out a pull request locally:
- Check out a specific pull request locally:
`gh pr checkout {{pr_number}}`
- View the changes made in the PR:
- View the changes made in the pull request for the current branch:
`gh pr diff`
- Approve the pull request of the current branch:
- Approve the pull request for the current branch:
`gh pr review --approve`
@@ -30,3 +30,7 @@
- Edit the base branch of a pull request:
`gh pr edit --base {{branch_name}}`
- Check the status of the current repository's pull requests:
`gh pr status`

View File

@@ -15,7 +15,7 @@
`gh repo fork {{owner}}/{{repository}} --clone`
- View a repository in the web browser:
- View a repository in the default web browser:
`gh repo view {{repository}} --web`

View File

@@ -16,7 +16,7 @@
`gh issue list`
- View an issue in the browser:
- View an issue in the default web browser:
`gh issue view --web {{issue_number}}`
@@ -24,11 +24,11 @@
`gh pr create`
- View a pull request in the browser:
- View a pull request in the default web browser:
`gh pr view --web {{pr_number}}`
- Locally check out the branch of a pull request, given its number:
- Check out a specific pull request locally:
`gh pr checkout {{pr_number}}`

View File

@@ -13,7 +13,7 @@
- Create a `glab` subcommand alias:
`glab alias set {{pv}} '{{pr view}}'`
`glab alias set {{mrv}} '{{mr view}}'`
- Set a shell command as a `glab` subcommand:

View File

@@ -7,6 +7,10 @@
`glab issue view {{issue_number}}`
- Display a specific issue in the default web browser:
`glab issue view {{issue_number}} --web`
- Create a new issue in the default web browser:
`glab issue create --web`

View File

@@ -8,7 +8,7 @@
`glab mr create`
- Check out a merge request locally:
- Check out a specific merge request locally:
`glab mr checkout {{mr_number}}`

View File

@@ -15,7 +15,7 @@
`glab repo fork {{owner}}/{{repository}} --clone`
- View a repository in the web browser:
- View a repository in the default web browser:
`glab repo view {{owner}}/{{repository}} --web`

View File

@@ -1,28 +1,33 @@
# glab
> GitLab CLI tool to help working with GitLab from the command-line.
> Work seamlessly with GitLab from the command-line.
> Some subcommands such as `glab config` have their own usage documentation.
> More information: <https://github.com/profclems/glab>.
- Create a merge request:
- Clone a GitLab repository locally:
`glab mr create`
- List merge requests:
`glab mr list`
`glab repo clone {{owner}}/{{repository}}`
- Create a new issue:
`glab issue create`
- View and filter the current repository's open issues:
- View and filter the open issues of the current repository:
`glab issue list`
- List pipelines:
- View an issue in the default browser:
`glab pipeline list`
`glab issue view --web {{issue_number}}`
- Clone a repository into a specific directory:
- Create a merge request:
`glab repo clone {{user}}/{{repository}} {{directory}}`
`glab mr create`
- View a pull request in the default web browser:
`glab mr view --web {{pr_number}}`
- Check out a specific pull request locally:
`glab mr checkout {{pr_number}}`