Skip to content

Commit b9c5589

Browse files
brechtvldelvh
authored andcommitted
Add basic documentation for labels, including scoped labels (go-gitea#23304)
Part of go-gitea#22974 --------- Co-authored-by: delvh <dev.lh@web.de>
1 parent 1edb57e commit b9c5589

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

Diff for: docs/content/doc/usage/labels.en-us.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
date: "2023-03-04T19:00:00+00:00"
3+
title: "Usage: Labels"
4+
slug: "labels"
5+
weight: 13
6+
toc: false
7+
draft: false
8+
menu:
9+
sidebar:
10+
parent: "usage"
11+
name: "Labels"
12+
weight: 13
13+
identifier: "labels"
14+
---
15+
16+
# Labels
17+
18+
You can use labels to classify issues and pull requests and to improve your overview over them.
19+
20+
## Creating Labels
21+
22+
For repositories, labels can be created by going to `Issues` and clicking on `Labels`.
23+
24+
For organizations, you can define organization-wide labels that are shared with all organization repositories, including both already-existing repositories as well as newly created ones. Organization-wide labels can be created in the organization `Settings`.
25+
26+
Labels have a mandatory name, a mandatory color, an optional description, and must either be exclusive or not (see `Scoped labels` below).
27+
28+
When you create a repository, you can ensure certain labels exist by using the `Issue Labels` option. This option lists a number of available label sets that are [configured globally on your instance](../customizing-gitea/#labels). Its contained labels will all be created as well while creating the repository.
29+
30+
## Scoped Labels
31+
32+
A scoped label is a label that contains `/` in its name (not at either end of the name). For example labels `kind/bug` and `kind/enhancement` both have scope `kind`. Such labels will display the scope with slightly darker color.
33+
34+
The scope of a label is determined based on the **last** `/`, so for example the scope of label `scope/subscope/item` is `scope/subscope`.
35+
36+
Scoped labels can be marked as exclusive. This ensures at most a single label with the same scope is assigned to an issue or pull request. For example, if `kind/bug` and `kind/enhancement` are marked exclusive, an issue can only be classified as a bug or an enhancement.
37+
38+
## Filtering by Label
39+
40+
Issue and pull request lists can be filtered by label. Selecting multiple labels shows issues and pull requests that have all selected labels assigned.
41+
42+
By holding alt to click the label, issues and pull requests with the chosen label are excluded from the list.

0 commit comments

Comments
 (0)