Skip to content

Commit 3671df2

Browse files
committed
Update README - more concise details
1 parent f8c3f69 commit 3671df2

File tree

1 file changed

+12
-25
lines changed

1 file changed

+12
-25
lines changed

README.md

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,58 @@
22

33
CLI commands for performing actions against GitLab repositories. The main reasons for building this tool is to be able to use it without any prerequisites and to deal with global labels, which GitLab API doesn't expose.
44

5+
- [Installation](#installation)
56
- [Usage](#usage)
67
- [Labels](#labels)
78
- [Specifying a repository](#specifying-a-repository)
89
- [The config file](#the-config-file)
9-
- [Install](#install)
10-
- [Update](#update)
1110
- [Development](#development)
1211

12+
## Installation
13+
14+
Follow the instructions from the [releases page](https://github.com/clns/gitlab-cli/releases).
15+
1316
## Usage
1417

15-
See help for all available commands (`gitlab-cli -h`).
18+
For all available commands see the command's help: `gitlab-cli -h`. The most common commands are documented below.
1619

1720
### Labels
1821

19-
##### Copy global labels into a target repository
22+
#### Copy global labels into a repository
2023

21-
> GitLab Limitation: Currently there's no way to [access global labels through the API](https://twitter.com/gitlab/status/724619173477924865), so this tool provides a workaround for copying them into a repository. Note that you should configure the global labels manually in GitLab.
24+
GitLab Limitation: Currently there's no way to [access global labels through the API](https://twitter.com/gitlab/status/724619173477924865), so this tool provides a workaround to copy them.
2225

2326
```sh
2427
gitlab-cli label copy -U https://gitlab.com/<USER>/<REPO> -t <TOKEN>
2528
```
2629

2730
> Tip: To avoid specifying `-U` and `-t` every time you refer to a repository, you can use the config file to save the details of it. See [Specifying a repository](#specifying-a-repository).
2831
29-
##### Copy labels from one repository to another
32+
#### Copy labels from one repository to another
3033

3134
```sh
3235
gitlab-cli label copy -r <NAME> <GROUP>/<REPO>
3336
```
3437

3538
> Tip: The above command copies labels between repositories on the same GitLab instance. To copy from/to a different GitLab instance, use the config file as explained in [Specifying a repository](#specifying-a-repository).
3639
37-
##### Update label(s) based on a regex match
40+
#### Update labels that match a regex
3841

3942
```sh
4043
gitlab-cli label update -r <NAME> --match <REGEX> --replace <REPLACE> --color <COLOR>
4144
```
4245

4346
> Note: `<REGEX>` is a Go regex string as in <https://golang.org/pkg/regexp/syntax> and `<REPLACE>` is a replacement string as in <https://golang.org/pkg/regexp/#Regexp.FindAllString>.
4447
45-
##### Delete label(s) that match a regex
48+
#### Delete labels that match a regex
4649

4750
```sh
4851
gitlab-cli label update -r <NAME> --regex <REGEX>
4952
```
5053

5154
### TODO
5255

53-
Currently only the label commands are useful. Other commands can be added as needed. Feel free to open pull requests or issues.
56+
Other commands can be added as needed. Feel free to open pull requests or issues.
5457

5558
### Specifying a repository
5659

@@ -106,22 +109,6 @@ But there's no need to manually edit this file. Instead use the config commands
106109
- `gitlab-cli config repo save ...` - save a repository
107110
- `gitlab-cli config repo show -r <repo>` - show the details of a saved repository
108111

109-
## Install
110-
111-
1. Follow the instructions from the [releases page](https://github.com/clns/gitlab-cli/releases) and run the `curl` command, which the releases page specifies, in your terminal.
112-
113-
> Note: If you get a "Permission denied" error, your `/usr/local/bin` directory probably isn't writable and you'll need to install Compose as the superuser. Run `sudo -i`, then the commands from the release page, then `exit`.
114-
115-
2. Test the installation.
116-
117-
```sh
118-
gitlab-cli version
119-
```
120-
121-
### Update
122-
123-
When running any command, the tool will notify you if a new update is available (e.g. `New update available: 1.0.1. Run 'gitlab-cli update' to update.`), and you can simply run `gitlab-cli update` to update.
124-
125112
## Development
126113

127114
You'll need a [Go dev environment](https://golang.org/doc/install).

0 commit comments

Comments
 (0)