Skip to content

Commit

Permalink
gh*, glab*: standardize documentation (tldr-pages#7957)
Browse files Browse the repository at this point in the history
  • Loading branch information
reinhart1010 authored May 2, 2022
1 parent e897720 commit 6ed9681
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 26 deletions.
10 changes: 7 additions & 3 deletions pages/common/gh-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand All @@ -23,6 +27,6 @@

`gh issue status --repo {{owner}}/{{repository}}`

- Reopen an issue:
- Reopen a specific issue:

`gh issue reopen {{issue_number}}`
2 changes: 1 addition & 1 deletion pages/common/gh-pr-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
10 changes: 7 additions & 3 deletions pages/common/gh-pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand All @@ -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`
2 changes: 1 addition & 1 deletion pages/common/gh-repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
6 changes: 3 additions & 3 deletions pages/common/gh.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@

`gh issue list`

- View an issue in the browser:
- View an issue in the default web browser:

`gh issue view --web {{issue_number}}`

- Create a pull request:

`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}}`

Expand Down
2 changes: 1 addition & 1 deletion pages/common/glab-alias.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
4 changes: 4 additions & 0 deletions pages/common/glab-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion pages/common/glab-mr.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}}`

Expand Down
2 changes: 1 addition & 1 deletion pages/common/glab-repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
29 changes: 17 additions & 12 deletions pages/common/glab.md
Original file line number Diff line number Diff line change
@@ -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:

`glab mr create`
- Clone a GitLab repository locally:

- 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 issue view --web {{issue_number}}`

- Create a merge request:

`glab mr create`

- View a pull request in the default web browser:

`glab pipeline list`
`glab mr view --web {{pr_number}}`

- Clone a repository into a specific directory:
- Check out a specific pull request locally:

`glab repo clone {{user}}/{{repository}} {{directory}}`
`glab mr checkout {{pr_number}}`

0 comments on commit 6ed9681

Please sign in to comment.