@@ -12,7 +12,7 @@ pip install labels
12
12
13
13
## Authentication
14
14
15
- The labels CLI connects to the GitHub API to modify issue labels for a GitHub
15
+ The labels CLI connects to the GitHub API to modify labels for a GitHub
16
16
repository. Please [ create your own personal API token] [ create token ] and
17
17
choose the correct token scope based on whether you want to manage issue
18
18
labels for a public or a private repository. Then set up two environment
@@ -26,20 +26,18 @@ export LABELS_TOKEN="<GITHUB_TOKEN>"
26
26
## Usage
27
27
28
28
Once you've installed ** labels** and set up the environment variables, you're
29
- ready to use the ** labels** CLI to manage issue labels for a GitHub
30
- repository. The CLI comes with two commands: `` fetch `` and `` sync `` .
31
-
32
- Both commands require the owner and the name of the GitHub repository to
33
- fetch from or sync to. By default, ** labels** tries to load this information
34
- from your local Git repository based on the URL for the ` origin ` remote
35
- repository.
29
+ ready to use the ** labels** CLI to manage labels for a GitHub repository. The
30
+ CLI comes with two commands: `` fetch `` and `` sync `` . Both commands require
31
+ the name of the owner and the name of the GitHub repository to fetch from or
32
+ sync to. By default, ** labels** tries to load this information from your
33
+ local Git repository based on the URL for the ` origin ` remote repository.
36
34
37
35
For example, if you run ** labels** from your local clone of the [ earth
38
36
] [ earth_repo ] repository with ` origin ` set to
39
- ` [email protected] :hackebrot/earth.git` , owner will be
` hackebrot ` and repo will
37
+ ` [email protected] :hackebrot/earth.git` owner will be
` hackebrot ` and repo will
40
38
be ` earth ` . 🌍
41
39
42
- You can override each of these values manually using the following CLI
40
+ You can override one or both of these values manually using the following CLI
43
41
options:
44
42
45
43
``` text
@@ -49,15 +47,15 @@ options:
49
47
50
48
### Fetch
51
49
52
- When you're using ** labels** for the first time, you want to fetch
50
+ When you use ** labels** for the first time, you will start by fetching
53
51
information about the existing labels for your GitHub project. The CLI will
54
52
then write a [ TOML] [ toml ] file to your computer with the retrieved
55
- information. The default filename for this file is `` labels.toml `` in your
56
- current working directory and can be changed by passing the
57
- `` -f, --filename PATH`` option followed by a path.
53
+ information. The default name for this file is `` labels.toml `` in your
54
+ current working directory and can be changed by passing the ``-f, --filename
55
+ PATH`` option followed by the path to where you want to write to .
58
56
59
57
``` text
60
- $ labels fetch -o hackebrot -r pytest-emoji
58
+ labels fetch -o hackebrot -r pytest-emoji
61
59
```
62
60
63
61
``` toml
@@ -89,11 +87,11 @@ name = "good first issue"
89
87
90
88
### Sync
91
89
92
- Now that you have a file on your computer that represents your GitHub issue
93
- labels, you can edit this file and then run ** labels sync** to update the
94
- remote repository. But first let's look into how that works... 🔍
90
+ Now that you have a file on your computer that represents your GitHub labels,
91
+ you can edit this file and then run ** labels sync** to update the remote
92
+ repository. But first let's look into how that works... 🔍
95
93
96
- Representation of a GitHub issue label in the written TOML file:
94
+ Representation of a GitHub label in the written TOML file:
97
95
98
96
``` toml
99
97
[docs ]
@@ -105,14 +103,16 @@ name = "docs"
105
103
The section name (`` [docs] `` in the example above) represents the name of the
106
104
label for that repository and is identical to the `` name `` field when running
107
105
`` labels fetch `` . Do not edit the section name of existing labels yourself!
106
+ ⚠️
107
+
108
108
The fields `` color `` , `` description `` and `` name `` are parameters that you
109
109
can edit with the ** labels** CLI.
110
110
111
111
- `` name `` - The name of the label
112
112
- `` description `` - A short description of the label
113
- - `` color `` - The hexadecimal color code for the label, without the leading `` # ``
113
+ - `` color `` - The hexadecimal color code for the label without the leading `` # ``
114
114
115
- You can make the following changes to issue labels for your repo:
115
+ You can make the following changes to labels for your repo:
116
116
117
117
- You can ** delete** a label by removing the corresponding section from the
118
118
labels file 🗑
@@ -133,7 +133,7 @@ Check your label changes before syncing by using the ``dryrun`` CLI option:
133
133
Example usage:
134
134
135
135
``` text
136
- $ labels sync -n -o hackebrot -r pytest-emoji
136
+ labels sync -n -o hackebrot -r pytest-emoji
137
137
```
138
138
139
139
``` text
@@ -153,8 +153,8 @@ Running ``labels sync`` without the ``dryrun`` option also updates the labels
153
153
file, so that section names match the `` name `` parameter.
154
154
155
155
If ** labels** encounters any errors while sending requests to the GitHub API,
156
- it will print information about the failure and continue with the next
157
- label until it processed all of the labels.
156
+ it will print information about the failure and continue with the next label
157
+ until it has processed all of the labels.
158
158
159
159
## Community
160
160
0 commit comments