Skip to content

Commit 6af9383

Browse files
committed
Merge branch 'main' into keep-svg-xmlns
2 parents fb0548f + 0f2361f commit 6af9383

File tree

308 files changed

+13852
-9961
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

308 files changed

+13852
-9961
lines changed

.drone.yml

Lines changed: 121 additions & 83 deletions
Large diffs are not rendered by default.

.stylelintrc.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ ignoreFiles:
55
- "**/*.go"
66

77
overrides:
8-
- files: ["**/*.less"]
9-
customSyntax: postcss-less
108
- files: ["**/chroma/*", "**/codemirror/*", "**/standalone/*", "**/console/*"]
119
rules:
1210
scale-unlimited/declaration-strict-value: null

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ AIR_PACKAGE ?= github.com/cosmtrek/[email protected]
2929
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/[email protected]
3030
ERRCHECK_PACKAGE ?= github.com/kisielk/[email protected]
3131
GOFUMPT_PACKAGE ?= mvdan.cc/[email protected]
32-
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/[email protected].0
32+
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/[email protected].2
3333
GXZ_PAGAGE ?= github.com/ulikunitz/xz/cmd/[email protected]
3434
MISSPELL_PACKAGE ?= github.com/client9/misspell/cmd/[email protected]
3535
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/[email protected]
@@ -105,7 +105,7 @@ GO_TEST_PACKAGES ?= $(filter-out $(shell $(GO) list code.gitea.io/gitea/models/m
105105

106106
FOMANTIC_WORK_DIR := web_src/fomantic
107107

108-
WEBPACK_SOURCES := $(shell find web_src/js web_src/less -type f)
108+
WEBPACK_SOURCES := $(shell find web_src/js web_src/css -type f)
109109
WEBPACK_CONFIGS := webpack.config.js
110110
WEBPACK_DEST := public/js/index.js public/css/index.css
111111
WEBPACK_DEST_ENTRIES := public/js public/css public/fonts public/img/webpack public/serviceworker.js
@@ -131,7 +131,7 @@ TEST_TAGS ?= sqlite sqlite_unlock_notify
131131
TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMANTIC_WORK_DIR)/node_modules $(DIST) $(MAKE_EVIDENCE_DIR) $(AIR_TMP_DIR) $(GO_LICENSE_TMP_DIR)
132132

133133
GO_DIRS := cmd tests models modules routers build services tools
134-
WEB_DIRS := web_src/js web_src/less
134+
WEB_DIRS := web_src/js web_src/css
135135

136136
GO_SOURCES := $(wildcard *.go)
137137
GO_SOURCES += $(shell find $(GO_DIRS) -type f -name "*.go" -not -path modules/options/bindata.go -not -path modules/public/bindata.go -not -path modules/templates/bindata.go)
@@ -342,7 +342,7 @@ lint: lint-frontend lint-backend
342342
.PHONY: lint-frontend
343343
lint-frontend: node_modules
344344
npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js docs/assets/js tests/e2e
345-
npx stylelint --color --max-warnings=0 web_src/less
345+
npx stylelint --color --max-warnings=0 web_src/css
346346
npx spectral lint -q -F hint $(SWAGGER_SPEC)
347347
npx markdownlint docs *.md
348348

cmd/dump.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ func runDump(ctx *cli.Context) error {
250250

251251
if ctx.IsSet("skip-lfs-data") && ctx.Bool("skip-lfs-data") {
252252
log.Info("Skip dumping LFS data")
253-
} else if err := storage.LFS.IterateObjects(func(objPath string, object storage.Object) error {
253+
} else if err := storage.LFS.IterateObjects("", func(objPath string, object storage.Object) error {
254254
info, err := object.Stat()
255255
if err != nil {
256256
return err
@@ -351,7 +351,7 @@ func runDump(ctx *cli.Context) error {
351351

352352
if ctx.IsSet("skip-attachment-data") && ctx.Bool("skip-attachment-data") {
353353
log.Info("Skip dumping attachment data")
354-
} else if err := storage.Attachments.IterateObjects(func(objPath string, object storage.Object) error {
354+
} else if err := storage.Attachments.IterateObjects("", func(objPath string, object storage.Object) error {
355355
info, err := object.Stat()
356356
if err != nil {
357357
return err
@@ -364,7 +364,7 @@ func runDump(ctx *cli.Context) error {
364364

365365
if ctx.IsSet("skip-package-data") && ctx.Bool("skip-package-data") {
366366
log.Info("Skip dumping package data")
367-
} else if err := storage.Packages.IterateObjects(func(objPath string, object storage.Object) error {
367+
} else if err := storage.Packages.IterateObjects("", func(objPath string, object storage.Object) error {
368368
info, err := object.Stat()
369369
if err != nil {
370370
return err

custom/conf/app.example.ini

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
;; - The environment variable `$GITEA_WORK_DIR`
2121
;; - A built-in value set at build time (see building from source)
2222
;; - Otherwise it defaults to the directory of the _`AppPath`_
23-
;; - If any of the above are relative paths then they are made absolute against the
23+
;; - If any of the above are relative paths then they are made absolute against
2424
;; the directory of the _`AppPath`_
2525
;; - _`CustomPath`_: This is the base directory for custom templates and other options.
2626
;; It is determined by using the first set thing in the following hierarchy:
@@ -576,6 +576,22 @@ ROUTER = console
576576
;; The routing level will default to that of the system but individual router level can be set in
577577
;; [log.<mode>.router] LEVEL
578578
;;
579+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
580+
;;
581+
;; Print request id which parsed from request headers in access log, when access log is enabled.
582+
;; * E.g:
583+
;; * In request Header: X-Request-ID: test-id-123
584+
;; * Configuration in app.ini: REQUEST_ID_HEADERS = X-Request-ID
585+
;; * Print in log: 127.0.0.1:58384 - - [14/Feb/2023:16:33:51 +0800] "test-id-123"
586+
;;
587+
;; If you configure more than one in the .ini file, it will match in the order of configuration,
588+
;; and the first match will be finally printed in the log.
589+
;; * E.g:
590+
;; * In reuqest Header: X-Trace-ID: trace-id-1q2w3e4r
591+
;; * Configuration in app.ini: REQUEST_ID_HEADERS = X-Request-ID, X-Trace-ID, X-Req-ID
592+
;; * Print in log: 127.0.0.1:58384 - - [14/Feb/2023:16:33:51 +0800] "trace-id-1q2w3e4r"
593+
;;
594+
;; REQUEST_ID_HEADERS =
579595

580596
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
581597
;;
@@ -2256,6 +2272,17 @@ ROUTER = console
22562272
;PULL = 300
22572273
;GC = 60
22582274

2275+
2276+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2277+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2278+
;; Git Reflog timeout in days
2279+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2280+
;[git.reflog]
2281+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2282+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2283+
;ENABLED = true
2284+
;EXPIRATION = 90
2285+
22592286
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
22602287
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
22612288
;[mirror]
@@ -2489,6 +2516,8 @@ ROUTER = console
24892516
;LIMIT_SIZE_PYPI = -1
24902517
;; Maximum size of a RubyGems upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
24912518
;LIMIT_SIZE_RUBYGEMS = -1
2519+
;; Maximum size of a Swift upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
2520+
;LIMIT_SIZE_SWIFT = -1
24922521
;; Maximum size of a Vagrant upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
24932522
;LIMIT_SIZE_VAGRANT = -1
24942523

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
THEME := themes/gitea
22
PUBLIC := public
3-
ARCHIVE := https://dl.gitea.io/theme/master.tar.gz
3+
ARCHIVE := https://dl.gitea.com/theme/main.tar.gz
44

55
HUGO_PACKAGE := github.com/gohugoio/[email protected]
66

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ reported as part of the default configuration when running `gitea --help` or on
4646
- The environment variable `$GITEA_WORK_DIR`
4747
- A built-in value set at build time (see building from source)
4848
- Otherwise it defaults to the directory of the _`AppPath`_
49-
- If any of the above are relative paths then they are made absolute against the
49+
- If any of the above are relative paths then they are made absolute against
5050
the directory of the _`AppPath`_
5151
- _`CustomPath`_: This is the base directory for custom templates and other options.
5252
It is determined by using the first set thing in the following hierarchy:
@@ -881,7 +881,13 @@ Default templates for project boards:
881881
- `Identity`: the SignedUserName or `"-"` if not logged in.
882882
- `Start`: the start time of the request.
883883
- `ResponseWriter`: the responseWriter from the request.
884+
- `RequestID`: the value matching REQUEST_ID_HEADERS(default: `-`, if not matched).
884885
- You must be very careful to ensure that this template does not throw errors or panics as this template runs outside of the panic/recovery script.
886+
- `REQUEST_ID_HEADERS`: **\<empty\>**: You can configure multiple values that are splited by comma here. It will match in the order of configuration, and the first match will be finally printed in the access log.
887+
- e.g.
888+
- In the Request Header: X-Request-ID: **test-id-123**
889+
- Configuration in app.ini: REQUEST_ID_HEADERS = X-Request-ID
890+
- Print in log: 127.0.0.1:58384 - - [14/Feb/2023:16:33:51 +0800] "**test-id-123**" ...
885891

886892
### Log subsections (`log.name`, `log.name.*`)
887893

@@ -1087,6 +1093,11 @@ Default templates for project boards:
10871093
- `DISABLE_CORE_PROTECT_NTFS`: **false** Set to true to forcibly set `core.protectNTFS` to false.
10881094
- `DISABLE_PARTIAL_CLONE`: **false** Disable the usage of using partial clones for git.
10891095

1096+
## Git - Reflog settings (`git.reflog`)
1097+
1098+
- `ENABLED`: **true** Set to true to enable Git to write changes to reflogs in each repo.
1099+
- `EXPIRATION`: **90** Reflog entry lifetime, in days. Entries are removed opportunistically by Git.
1100+
10901101
## Git - Timeout settings (`git.timeout`)
10911102

10921103
- `DEFAULT`: **360**: Git operations default timeout seconds.
@@ -1243,6 +1254,7 @@ Task queue configuration has been moved to `queue.task`. However, the below conf
12431254
- `LIMIT_SIZE_PUB`: **-1**: Maximum size of a Pub upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
12441255
- `LIMIT_SIZE_PYPI`: **-1**: Maximum size of a PyPI upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
12451256
- `LIMIT_SIZE_RUBYGEMS`: **-1**: Maximum size of a RubyGems upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
1257+
- `LIMIT_SIZE_SWIFT`: **-1**: Maximum size of a Swift upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
12461258
- `LIMIT_SIZE_VAGRANT`: **-1**: Maximum size of a Vagrant upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
12471259

12481260
## Mirror (`mirror`)

docs/content/doc/advanced/config-cheat-sheet.zh-cn.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,22 @@ test01.xls: application/vnd.ms-excel; charset=binary
262262

263263
- `ROOT_PATH`: 日志文件根目录。
264264
- `MODE`: 日志记录模式,默认是为 `console`。如果要写到多个通道,用逗号分隔
265-
- `LEVEL`: 日志级别,默认为`Trace`
265+
- `LEVEL`: 日志级别,默认为 `Trace`
266+
- `DISABLE_ROUTER_LOG`: 关闭日志中的路由日志。
267+
- `ENABLE_ACCESS_LOG`: 是否开启 Access Log, 默认为 false。
268+
- `ACCESS_LOG_TEMPLATE`: `access.log` 输出内容的模板,默认模板:**`{{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}"`**
269+
模板支持以下参数:
270+
- `Ctx`: 请求上下文。
271+
- `Identity`: 登录用户名,默认: “`-`”。
272+
- `Start`: 请求开始时间。
273+
- `ResponseWriter`:
274+
- `RequestID`: 从请求头中解析得到的与 `REQUEST_ID_HEADERS` 匹配的值,默认: “`-`”。
275+
- 一定要谨慎配置该模板,否则可能会引起panic.
276+
- `REQUEST_ID_HEADERS`: 从 Request Header 中匹配指定 Key,并将匹配到的值输出到 `access.log` 中(需要在 `ACCESS_LOG_TEMPLATE` 中指定输出位置)。如果在该参数中配置多个 Key, 请用逗号分割,程序将按照配置的顺序进行匹配。
277+
- 示例:
278+
- 请求头: X-Request-ID: **test-id-123**
279+
- 配置文件: REQUEST_ID_HEADERS = X-Request-ID
280+
- 日志输出: 127.0.0.1:58384 - - [14/Feb/2023:16:33:51 +0800] "**test-id-123**" ...
266281

267282
## Cron (`cron`)
268283

docs/content/doc/advanced/customizing-gitea.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ To make a custom theme available to all users:
354354
355355
Community themes are listed in [gitea/awesome-gitea#themes](https://gitea.com/gitea/awesome-gitea#themes).
356356
357-
The `arc-green` theme source can be found [here](https://github.com/go-gitea/gitea/blob/main/web_src/less/themes/theme-arc-green.less).
357+
The `arc-green` theme source can be found [here](https://github.com/go-gitea/gitea/blob/main/web_src/css/themes/theme-arc-green.css).
358358
359359
If your custom theme is considered a dark theme, set the global css variable `--is-dark-theme` to `true`.
360360
This allows Gitea to adjust the Monaco code editor's theme accordingly.

docs/content/doc/developers/guidelines-frontend.en-us.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ menu:
2121

2222
## Background
2323

24-
Gitea uses [Less CSS](https://lesscss.org), [Fomantic-UI](https://fomantic-ui.com/introduction/getting-started.html) (based on [jQuery](https://api.jquery.com)) and [Vue3](https://vuejs.org/) for its frontend.
24+
Gitea uses [Fomantic-UI](https://fomantic-ui.com/introduction/getting-started.html) (based on [jQuery](https://api.jquery.com)) and [Vue3](https://vuejs.org/) for its frontend.
2525

2626
The HTML pages are rendered by [Go HTML Template](https://pkg.go.dev/html/template).
2727

2828
The source files can be found in the following directories:
2929

30-
* **Less styles:** `web_src/less/`
30+
* **CSS styles:** `web_src/css/`
3131
* **JavaScript files:** `web_src/js/`
3232
* **Vue components:** `web_src/js/components/`
3333
* **Go HTML templates:** `templates/`

docs/content/doc/developers/oauth2-provider.en-us.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Gitea supports the following scopes for tokens:
6060
| &nbsp;&nbsp;&nbsp; **write:public_key** | Grant read/write access to public keys |
6161
| &nbsp;&nbsp;&nbsp; **read:public_key** | Grant read-only access to public keys |
6262
| **admin:org_hook** | Grants full access to organizational-level hooks |
63+
| **admin:user_hook** | Grants full access to user-level hooks |
6364
| **notification** | Grants full access to notifications |
6465
| **user** | Grants full access to user profile info |
6566
| &nbsp;&nbsp;&nbsp; **read:user** | Grants read access to user's profile |

docs/content/doc/features/localization.zh-cn.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,18 @@ menu:
1515

1616
# 本地化
1717

18-
## TBD
18+
Gitea的本地化是通过我们的[Crowdin项目](https://crowdin.com/project/gitea)进行的。
19+
20+
对于对**英语翻译**的更改,可以发出pull-request,来更改[英语语言环境](https://github.com/go-gitea/gitea/blob/master/options/locale/locale_en-US.ini)中合适的关键字。
21+
22+
有关对**非英语**翻译的更改,请参阅上面的 Crowdin 项目。
23+
24+
## 支持的语言
25+
26+
上述 Crowdin 项目中列出的任何语言一旦翻译了 25% 或更多都将得到支持。
27+
28+
翻译被接受后,它将在下一次 Crowdin 同步后反映在主存储库中,这通常是在任何 PR 合并之后。
29+
30+
在撰写本文时,这意味着更改后的翻译可能要到 Gitea 的下一个版本才会出现。
31+
32+
如果使用开发版本,则在同步更改内容后,它应该会在更新后立即显示。

docs/content/doc/packages/overview.en-us.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ The following package managers are currently supported:
4040
| [Pub]({{< relref "doc/packages/pub.en-us.md" >}}) | Dart | `dart`, `flutter` |
4141
| [PyPI]({{< relref "doc/packages/pypi.en-us.md" >}}) | Python | `pip`, `twine` |
4242
| [RubyGems]({{< relref "doc/packages/rubygems.en-us.md" >}}) | Ruby | `gem`, `Bundler` |
43+
| [Swift]({{< relref "doc/packages/rubygems.en-us.md" >}}) | Swift | `swift` |
4344
| [Vagrant]({{< relref "doc/packages/vagrant.en-us.md" >}}) | - | `vagrant` |
4445

4546
**The following paragraphs only apply if Packages are not globally disabled!**
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
date: "2023-01-10T00:00:00+00:00"
3+
title: "Swift Packages Repository"
4+
slug: "packages/swift"
5+
draft: false
6+
toc: false
7+
menu:
8+
sidebar:
9+
parent: "packages"
10+
name: "Swift"
11+
weight: 95
12+
identifier: "swift"
13+
---
14+
15+
# Swift Packages Repository
16+
17+
Publish [Swift](hhttps://www.swift.org/) packages for your user or organization.
18+
19+
**Table of Contents**
20+
21+
{{< toc >}}
22+
23+
## Requirements
24+
25+
To work with the Swift package registry, you need to use [swift](https://www.swift.org/getting-started/) to consume and a HTTP client (like `curl`) to publish packages.
26+
27+
## Configuring the package registry
28+
29+
To register the package registry and provide credentials, execute:
30+
31+
```shell
32+
swift package-registry set https://gitea.example.com/api/packages/{owner}/swift -login {username} -password {password}
33+
```
34+
35+
| Placeholder | Description |
36+
| ------------ | ----------- |
37+
| `owner` | The owner of the package. |
38+
| `username` | Your Gitea username. |
39+
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password. |
40+
41+
The login is optional and only needed if the package registry is private.
42+
43+
## Publish a package
44+
45+
First you have to pack the contents of your package:
46+
47+
```shell
48+
swift package archive-source
49+
```
50+
51+
To publish the package perform a HTTP PUT request with the package content in the request body.
52+
53+
```shell --user your_username:your_password_or_token \
54+
curl -X PUT --user {username}:{password} \
55+
-H "Accept: application/vnd.swift.registry.v1+json" \
56+
-F source-archive=@/path/to/package.zip \
57+
-F metadata={metadata} \
58+
https://gitea.example.com/api/packages/{owner}/swift/{scope}/{name}/{version}
59+
```
60+
61+
| Placeholder | Description |
62+
| ----------- | ----------- |
63+
| `username` | Your Gitea username. |
64+
| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}) instead of the password. |
65+
| `owner` | The owner of the package. |
66+
| `scope` | The package scope. |
67+
| `name` | The package name. |
68+
| `version` | The package version. |
69+
| `metadata` | (Optional) The metadata of the package. JSON encoded subset of https://schema.org/SoftwareSourceCode |
70+
71+
You cannot publish a package if a package of the same name and version already exists. You must delete the existing package first.
72+
73+
## Install a package
74+
75+
To install a Swift package from the package registry, add it in the `Package.swift` file dependencies list:
76+
77+
```
78+
dependencies: [
79+
.package(id: "{scope}.{name}", from:"{version}")
80+
]
81+
```
82+
83+
| Parameter | Description |
84+
| ----------- | ----------- |
85+
| `scope` | The package scope. |
86+
| `name` | The package name. |
87+
| `version` | The package version. |
88+
89+
Afterwards execute the following command to install it:
90+
91+
```shell
92+
swift package resolve
93+
```

docs/content/doc/usage/labels.en-us.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,15 @@ For repositories, labels can be created by going to `Issues` and clicking on `La
2323

2424
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`.
2525

26-
Labels have a mandatory name, a mandatory color, an optional description, and must either be exclusive or not (see `Scoped labels` below).
26+
Labels have a mandatory name, a mandatory color, an optional description, and must either be exclusive or not (see `Scoped Labels` below).
2727

2828
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.
2929

3030
## Scoped Labels
3131

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.
32+
Scoped labels are used to ensure at most a single label with the same scope is assigned to an issue or pull request. For example, if labels `kind/bug` and `kind/enhancement` have the Exclusive option set, an issue can only be classified as a bug or an enhancement.
3333

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.
34+
A scoped label must contain `/` in its name (not at either end of the name). The scope of a label is determined based on the **last** `/`, so for example the scope of label `scope/subscope/item` is `scope/subscope`.
3735

3836
## Filtering by Label
3937

docs/content/doc/usage/push-options.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ were added.
2929
Example of changing a repository's visibility to public:
3030

3131
```shell
32-
git push -o repo.private=false -u origin master
32+
git push -o repo.private=false -u origin main
3333
```

docs/content/doc/usage/push-options.zh-tw.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ Gitea 從 `1.13` 版開始支援某些 [push options](https://git-scm.com/docs/g
2929
以下範例修改儲存庫的可見性為公開:
3030

3131
```shell
32-
git push -o repo.private=false -u origin master
32+
git push -o repo.private=false -u origin main
3333
```

0 commit comments

Comments
 (0)