mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-01 09:34:58 +02:00
Merge remote-tracking branch 'upstream/main' into limit-repo-size
This commit is contained in:
@@ -18,7 +18,7 @@ menu:
|
||||
# 配置说明
|
||||
|
||||
这是针对Gitea配置文件的说明,你可以了解Gitea的强大配置。需要说明的是,你的所有改变请修改 `custom/conf/app.ini` 文件而不是源文件。
|
||||
所有默认值可以通过 [app.example.ini](https://github.com/go-gitea/gitea/blob/master/custom/conf/app.example.ini) 查看到。
|
||||
所有默认值可以通过 [app.example.ini](https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini) 查看到。
|
||||
如果你发现 `%(X)s` 这样的内容,请查看 [ini](https://github.com/go-ini/ini/#recursive-values) 这里的说明。
|
||||
标注了 :exclamation: 的配置项表明除非你真的理解这个配置项的意义,否则最好使用默认值。
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ Gitea 引用 `custom` 目录中的自定义配置文件来覆盖配置、模板
|
||||
`custom/conf/app.ini` 当中。在发行版中可能会以 `/etc/gitea/` 的形式为 `custom` 设置一个符号链接,查看配置详情请移步:
|
||||
|
||||
- [快速备忘单](https://docs.gitea.io/en-us/config-cheat-sheet/)
|
||||
- [完整配置清单](https://github.com/go-gitea/gitea/blob/master/custom/conf/app.example.ini)
|
||||
- [完整配置清单](https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini)
|
||||
|
||||
如果您在 binary 同目录下无法找到 `custom` 文件夹,请检查您的 `GITEA_CUSTOM`
|
||||
环境变量配置, 因为它可能被配置到了其他地方(可能被一些启动脚本设置指定了目录)。
|
||||
@@ -67,7 +67,7 @@ Gitea 引用 `custom` 目录中的自定义配置文件来覆盖配置、模板
|
||||
|
||||
同理,您可以将页签添加到 `extra_tabs.tmpl` 中,使用同样的方式来添加页签。它的具体样式需要与
|
||||
`templates/repo/header.tmpl` 中已有的其他选项卡的样式匹配
|
||||
([source in GitHub](https://github.com/go-gitea/gitea/blob/master/templates/repo/header.tmpl))
|
||||
([source in GitHub](https://github.com/go-gitea/gitea/blob/main/templates/repo/header.tmpl))
|
||||
|
||||
### 页面的其他新增内容
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ menu:
|
||||
Gitea's localization happens through our [Crowdin project](https://crowdin.com/project/gitea).
|
||||
|
||||
For changes to an **English** translation, a pull request can be made that changes the appropriate key in
|
||||
the [english locale](https://github.com/go-gitea/gitea/blob/master/options/locale/locale_en-US.ini).
|
||||
the [english locale](https://github.com/go-gitea/gitea/blob/main/options/locale/locale_en-US.ini).
|
||||
|
||||
For changes to a **non-English** translation, refer to the Crowdin project above.
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ menu:
|
||||
|
||||
Gitea的本地化是通过我们的[Crowdin项目](https://crowdin.com/project/gitea)进行的。
|
||||
|
||||
对于对**英语翻译**的更改,可以发出pull-request,来更改[英语语言环境](https://github.com/go-gitea/gitea/blob/master/options/locale/locale_en-US.ini)中合适的关键字。
|
||||
对于对**英语翻译**的更改,可以发出pull-request,来更改[英语语言环境](https://github.com/go-gitea/gitea/blob/main/options/locale/locale_en-US.ini)中合适的关键字。
|
||||
|
||||
有关对**非英语**翻译的更改,请参阅上面的 Crowdin 项目。
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ menu:
|
||||
|
||||
我們在 [Crowdin 專案](https://crowdin.com/project/gitea)上進行在地化工作。
|
||||
|
||||
**英語系**的翻譯,可在修改[英文語言檔](https://github.com/go-gitea/gitea/blob/master/options/locale/locale_en-US.ini)後提出合併請求。
|
||||
**英語系**的翻譯,可在修改[英文語言檔](https://github.com/go-gitea/gitea/blob/main/options/locale/locale_en-US.ini)後提出合併請求。
|
||||
|
||||
**非英語系**的翻譯,請前往上述的 Crowdin 專案。
|
||||
|
||||
|
||||
@@ -31,11 +31,11 @@ Gitea 定義了一些基本物件於套件 [modules/migration](https://github.co
|
||||
- 您必須實作一個 `DownloaderFactory`,它用來偵測 URL 是否符合並建立上述的 `Downloader`。
|
||||
- 您需要在 `init()` 透過 `RegisterDownloaderFactory` 來註冊 `DownloaderFactory`。
|
||||
|
||||
您可以在 [downloader.go](https://github.com/go-gitea/gitea/blob/master/modules/migration/downloader.go) 中找到這些介面。
|
||||
您可以在 [downloader.go](https://github.com/go-gitea/gitea/blob/main/modules/migration/downloader.go) 中找到這些介面。
|
||||
|
||||
## Uploader 介面
|
||||
|
||||
目前只有 `GiteaLocalUploader` 被實作出來,所以我們只能通過 `Uploader` 儲存已下載的資料到本地的 Gitea 實例。
|
||||
目前尚未支援其它 Uploader。
|
||||
|
||||
您可以在 [uploader.go](https://github.com/go-gitea/gitea/blob/master/modules/migration/uploader.go) 中找到這些介面。
|
||||
您可以在 [uploader.go](https://github.com/go-gitea/gitea/blob/main/modules/migration/uploader.go) 中找到這些介面。
|
||||
|
||||
@@ -25,21 +25,19 @@ For more help resources, check all [Support Options]({{< relref "doc/help/suppor
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
## Difference between 1.x and 1.x.x downloads
|
||||
## Difference between 1.x and 1.x.x downloads, how can I get latest stable release with bug fixes?
|
||||
|
||||
Version 1.7.x will be used for this example.
|
||||
Version 1.20.x will be used for this example.
|
||||
|
||||
**NOTE:** this example applies to Docker images as well!
|
||||
On our [downloads page](https://dl.gitea.com/gitea/) you will see a 1.20 directory, as well as directories for 1.20.0, 1.20.1.
|
||||
|
||||
On our [downloads page](https://dl.gitea.io/gitea/) you will see a 1.7 directory, as well as directories for 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, and 1.7.6.
|
||||
The 1.20 directory is the nightly build, which is built on each merged commit to the [`release/v1.20`](https://github.com/go-gitea/gitea/tree/release/v1.20) branch.
|
||||
|
||||
The 1.7 and 1.7.0 directories are **not** the same. The 1.7 directory is built on each merged commit to the [`release/v1.7`](https://github.com/go-gitea/gitea/tree/release/v1.7) branch.
|
||||
The 1.20.0 directory is a release build that was created when the [`v1.20.0`](https://github.com/go-gitea/gitea/releases/tag/v1.20.0) tag was created.
|
||||
|
||||
The 1.7.0 directory, however, is a build that was created when the [`v1.7.0`](https://github.com/go-gitea/gitea/releases/tag/v1.7.0) tag was created.
|
||||
The nightly builds (1.x) downloads will change as commits are merged to their respective branch, they contain the latest changes/fixes before a tag release is built.
|
||||
|
||||
This means that 1.x downloads will change as commits are merged to their respective branch (think of it as a separate "main" branch for each release).
|
||||
|
||||
On the other hand, 1.x.x downloads should never change.
|
||||
If a bug fix is targeted on 1.20.1 but 1.20.1 is not released yet, you can get the "1.20-nightly" build to get the bug fix.
|
||||
|
||||
## How to migrate from Gogs/GitHub/etc. to Gitea
|
||||
|
||||
@@ -404,14 +402,6 @@ You will also need to change the app.ini database charset to `CHARSET=utf8mb4`.
|
||||
|
||||
Gitea requires the system or browser to have one of the supported Emoji fonts installed, which are Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji and Twemoji Mozilla. Generally, the operating system should already provide one of these fonts, but especially on Linux, it may be necessary to install them manually.
|
||||
|
||||
## Stdout logging on SystemD and Docker
|
||||
|
||||
Stdout on systemd goes to the journal by default. Try using `journalctl`, `journalctl -u gitea`, or `journalctl <path-to-gitea-binary>`.
|
||||
|
||||
Similarly, stdout on docker can be viewed using `docker logs <container>`.
|
||||
|
||||
To collect logs for help and issue report, see [Support Options]({{< relref "doc/help/support.en-us.md" >}}).
|
||||
|
||||
## Initial logging
|
||||
|
||||
Before Gitea has read the configuration file and set-up its logging it will log a number of things to stdout in order to help debug things if logging does not work.
|
||||
@@ -454,12 +444,6 @@ gitea doctor recreate-table
|
||||
|
||||
It is highly recommended to back-up your database before running these commands.
|
||||
|
||||
## Why are tabs/indents wrong when viewing files
|
||||
|
||||
If you are using Cloudflare, turn off the auto-minify option in the dashboard.
|
||||
|
||||
`Speed` -> `Optimization` -> Uncheck `HTML` within the `Auto-Minify` settings.
|
||||
|
||||
## How to adopt repositories from disk
|
||||
|
||||
- Add your (bare) repositories to the correct spot for your configuration (`repository.ROOT`), ensuring they are in the correct layout `<REPO_ROOT>/[user]/[repo].git`.
|
||||
@@ -470,3 +454,17 @@ If you are using Cloudflare, turn off the auto-minify option in the dashboard.
|
||||
- Users can also be given similar permissions via config [`ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`]({{< relref "doc/administration/config-cheat-sheet.en-us.md#repository" >}}).
|
||||
- If the above steps are done correctly, you should be able to select repositories to adopt.
|
||||
- If no repositories are found, enable [debug logging]({{< relref "doc/administration/config-cheat-sheet.en-us.md#repository" >}}) to check for any specific errors.
|
||||
|
||||
## Gitea can't start on NFS
|
||||
|
||||
In most cases, it's caused by broken NFS lock system. You can try to stop Gitea process and
|
||||
run `flock -n /data-nfs/gitea/queues/LOCK echo 'lock acquired'` to see whether the lock can be acquired immediately.
|
||||
If the lock can't be acquired, NFS might report some errors like `lockd: cannot monitor node-3, statd: server rpc.statd not responding, timed out` in its server logs.
|
||||
|
||||
Then the NFS lock could be reset by:
|
||||
|
||||
```bash
|
||||
# /etc/init.d/nfs stop
|
||||
# rm -rf /var/lib/nfs/sm/*
|
||||
# /etc/init.d/nfs start
|
||||
```
|
||||
|
||||
@@ -35,30 +35,13 @@ menu:
|
||||
[log]
|
||||
LEVEL=debug
|
||||
MODE=console,file
|
||||
ROUTER=console,file
|
||||
XORM=console,file
|
||||
ENABLE_XORM_LOG=true
|
||||
FILE_NAME=gitea.log
|
||||
[log.file.router]
|
||||
FILE_NAME=router.log
|
||||
[log.file.xorm]
|
||||
FILE_NAME=xorm.log
|
||||
```
|
||||
|
||||
3. Any error messages you are seeing.
|
||||
4. When possible, try to replicate the issue on [try.gitea.io](https://try.gitea.io) and include steps so that others can reproduce the issue.
|
||||
- This will greatly improve the chance that the root of the issue can be quickly discovered and resolved.
|
||||
5. If you meet slow/hanging/deadlock problems, please report the stack trace when the problem occurs:
|
||||
1. Enable pprof in `app.ini` and restart Gitea
|
||||
|
||||
```ini
|
||||
[server]
|
||||
ENABLE_PPROF = true
|
||||
```
|
||||
|
||||
2. Trigger the bug, when Gitea gets stuck, use curl or browser to visit: `http://127.0.0.1:6060/debug/pprof/goroutine?debug=1` (IP must be `127.0.0.1` and port must be `6060`).
|
||||
3. If you are using Docker, please use `docker exec -it <container-name> curl "http://127.0.0.1:6060/debug/pprof/goroutine?debug=1"`.
|
||||
4. Report the output (the stack trace doesn't contain sensitive data)
|
||||
5. If you encounter slow/hanging/deadlock problems, please report the stack trace when the problem occurs.
|
||||
Go to the "Site Admin" -> "Monitoring" -> "Stacktrace" -> "Download diagnosis report".
|
||||
|
||||
## Bugs
|
||||
|
||||
|
||||
@@ -206,3 +206,61 @@ Similarly, a script for zsh-completion can be found at [`contrib/autocompletion/
|
||||
`.zshrc`.
|
||||
|
||||
YMMV and these scripts may need further improvement.
|
||||
|
||||
## Compile or cross-compile using Linux with Zig
|
||||
|
||||
Follow [Getting Started of Zig](https://ziglang.org/learn/getting-started/#installing-zig) to install zig.
|
||||
|
||||
- Compile (Linux ➝ Linux)
|
||||
|
||||
```sh
|
||||
CC="zig cc -target x86_64-linux-gnu" \
|
||||
CGO_ENABLED=1 \
|
||||
CGO_CFLAGS="-O2 -g -pthread" \
|
||||
CGO_LDFLAGS="-linkmode=external -v"
|
||||
GOOS=linux \
|
||||
GOARCH=amd64 \
|
||||
TAGS="bindata sqlite sqlite_unlock_notify" \
|
||||
make build
|
||||
```
|
||||
|
||||
- Cross-compile (Linux ➝ Windows)
|
||||
|
||||
```sh
|
||||
CC="zig cc -target x86_64-windows-gnu" \
|
||||
CGO_ENABLED=1 \
|
||||
CGO_CFLAGS="-O2 -g -pthread" \
|
||||
GOOS=windows \
|
||||
GOARCH=amd64 \
|
||||
TAGS="bindata sqlite sqlite_unlock_notify" \
|
||||
make build
|
||||
```
|
||||
|
||||
## Compile or cross-compile with Zig using Windows
|
||||
|
||||
Compile with `GIT BASH`.
|
||||
|
||||
- Compile (Windows ➝ Windows)
|
||||
|
||||
```sh
|
||||
CC="zig cc -target x86_64-windows-gnu" \
|
||||
CGO_ENABLED=1 \
|
||||
CGO_CFLAGS="-O2 -g -pthread" \
|
||||
GOOS=windows \
|
||||
GOARCH=amd64 \
|
||||
TAGS="bindata sqlite sqlite_unlock_notify" \
|
||||
make build
|
||||
```
|
||||
|
||||
- Cross-compile (Windows ➝ Linux)
|
||||
|
||||
```sh
|
||||
CC="zig cc -target x86_64-linux-gnu" \
|
||||
CGO_ENABLED=1 \
|
||||
CGO_CFLAGS="-O2 -g -pthread" \
|
||||
CGO_LDFLAGS="-linkmode=external -v"
|
||||
GOOS=linux \
|
||||
GOARCH=amd64 \
|
||||
TAGS="bindata sqlite sqlite_unlock_notify" \
|
||||
make build
|
||||
```
|
||||
|
||||
@@ -55,7 +55,7 @@ git checkout pr-xyz
|
||||
|
||||
## Compilation
|
||||
|
||||
Comme nous regroupons déjà toutes les bibliothèques requises pour compiler Gitea, vous pouvez continuer avec le processus de compilation lui-même. Nous fournissons diverses [tâches Make](https://github.com/go-gitea/gitea/blob/master/Makefile) pour rendre le processus de construction aussi simple que possible. [Voyez ici comment obtenir Make](/fr-fr/hacking-on-gitea/). Selon vos besoins, vous pourrez éventuellement ajouter diverses options de compilation, vous pouvez choisir entre ces options :
|
||||
Comme nous regroupons déjà toutes les bibliothèques requises pour compiler Gitea, vous pouvez continuer avec le processus de compilation lui-même. Nous fournissons diverses [tâches Make](https://github.com/go-gitea/gitea/blob/main/Makefile) pour rendre le processus de construction aussi simple que possible. [Voyez ici comment obtenir Make](/fr-fr/hacking-on-gitea/). Selon vos besoins, vous pourrez éventuellement ajouter diverses options de compilation, vous pouvez choisir entre ces options :
|
||||
|
||||
* `bindata`: Intègre toutes les ressources nécessaires à l'exécution d'une instance de Gitea, ce qui rend un déploiement facile car il n'est pas nécessaire de se préoccuper des fichiers supplémentaires.
|
||||
* `sqlite sqlite_unlock_notify`: Active la prise en charge d'une base de données [SQLite3](https://sqlite.org/), ceci n'est recommandé que pour les petites installations de Gitea.
|
||||
|
||||
@@ -103,3 +103,61 @@ GOOS=linux GOARCH=arm64 make build
|
||||
```bash
|
||||
CC=aarch64-unknown-linux-gnu-gcc GOOS=linux GOARCH=arm64 TAGS="bindata sqlite sqlite_unlock_notify" make build
|
||||
```
|
||||
|
||||
## 使用Linux与Zig编译或交叉编译
|
||||
|
||||
按照[Getting Started of Zig](https://ziglang.org/learn/getting-started/#installing-zig)来安装zig。
|
||||
|
||||
- 编译(Linux ➝ Linux)
|
||||
|
||||
```sh
|
||||
CC="zig cc -target x86_64-linux-gnu" \
|
||||
CGO_ENABLED=1 \
|
||||
CGO_CFLAGS="-O2 -g -pthread" \
|
||||
CGO_LDFLAGS="-linkmode=external -v"
|
||||
GOOS=linux \
|
||||
GOARCH=amd64 \
|
||||
TAGS="bindata sqlite sqlite_unlock_notify" \
|
||||
make build
|
||||
```
|
||||
|
||||
- 交叉编译(Linux ➝ Windows)
|
||||
|
||||
```sh
|
||||
CC="zig cc -target x86_64-windows-gnu" \
|
||||
CGO_ENABLED=1 \
|
||||
CGO_CFLAGS="-O2 -g -pthread" \
|
||||
GOOS=windows \
|
||||
GOARCH=amd64 \
|
||||
TAGS="bindata sqlite sqlite_unlock_notify" \
|
||||
make build
|
||||
```
|
||||
|
||||
## 使用Windows与Zig编译或交叉编译
|
||||
|
||||
使用`GIT BASH`编译。
|
||||
|
||||
- 编译(Windows ➝ Windows)
|
||||
|
||||
```sh
|
||||
CC="zig cc -target x86_64-windows-gnu" \
|
||||
CGO_ENABLED=1 \
|
||||
CGO_CFLAGS="-O2 -g -pthread" \
|
||||
GOOS=windows \
|
||||
GOARCH=amd64 \
|
||||
TAGS="bindata sqlite sqlite_unlock_notify" \
|
||||
make build
|
||||
```
|
||||
|
||||
- 交叉编译(Windows ➝ Linux)
|
||||
|
||||
```sh
|
||||
CC="zig cc -target x86_64-linux-gnu" \
|
||||
CGO_ENABLED=1 \
|
||||
CGO_CFLAGS="-O2 -g -pthread" \
|
||||
CGO_LDFLAGS="-linkmode=external -v"
|
||||
GOOS=linux \
|
||||
GOARCH=amd64 \
|
||||
TAGS="bindata sqlite sqlite_unlock_notify" \
|
||||
make build
|
||||
```
|
||||
|
||||
@@ -46,7 +46,7 @@ git checkout v{{< version >}}
|
||||
|
||||
## 編譯
|
||||
|
||||
完成設定相依性套件環境等工作後,您就可以開始編譯工作了。我們提供了不同的[編譯選項](https://github.com/go-gitea/gitea/blob/master/Makefile) ,讓編譯過程更加簡單。您可以根據需求來調整編譯選項,底下是可用的編譯選項說明:
|
||||
完成設定相依性套件環境等工作後,您就可以開始編譯工作了。我們提供了不同的[編譯選項](https://github.com/go-gitea/gitea/blob/main/Makefile) ,讓編譯過程更加簡單。您可以根據需求來調整編譯選項,底下是可用的編譯選項說明:
|
||||
|
||||
* `bindata`: 使用此標籤來嵌入所有 Gitea 相關資源,您不用擔心其他額外檔案,對於部署來說非常方便。
|
||||
* `sqlite sqlite_unlock_notify`: 使用此標籤來啟用 [SQLite3](https://sqlite.org/) 資料庫,建議只有少數人時才使用此模式。
|
||||
|
||||
@@ -25,7 +25,7 @@ menu:
|
||||
sudo vim /etc/systemd/system/gitea.service
|
||||
```
|
||||
|
||||
接着拷贝示例代码 [gitea.service](https://github.com/go-gitea/gitea/blob/master/contrib/systemd/gitea.service) 并取消对任何需要运行在主机上的服务部分的注释,譬如 MySQL。
|
||||
接着拷贝示例代码 [gitea.service](https://github.com/go-gitea/gitea/blob/main/contrib/systemd/gitea.service) 并取消对任何需要运行在主机上的服务部分的注释,譬如 MySQL。
|
||||
|
||||
修改 user,home 目录以及其他必须的初始化参数,如果使用自定义端口,则需修改 PORT 参数,反之如果使用默认端口则需删除 -p 标记。
|
||||
|
||||
@@ -58,7 +58,7 @@ sudo vim /etc/supervisor/supervisord.conf
|
||||
```
|
||||
|
||||
增加如下示例配置
|
||||
[supervisord config](https://github.com/go-gitea/gitea/blob/master/contrib/supervisor/gitea)。
|
||||
[supervisord config](https://github.com/go-gitea/gitea/blob/main/contrib/supervisor/gitea)。
|
||||
|
||||
将 user(git) 和 home(/home/git) 设置为与上文部署中匹配的值。如果使用自定义端口,则需修改 PORT 参数,反之如果使用默认端口则需删除 -p 标记。
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ menu:
|
||||
|
||||
#### 使用 systemd
|
||||
|
||||
複製範例 [gitea.service](https://github.com/go-gitea/gitea/blob/master/contrib/systemd/gitea.service) 到 `/etc/systemd/system/gitea.service` 後用您喜愛的文字編輯器開啟檔案。
|
||||
複製範例 [gitea.service](https://github.com/go-gitea/gitea/blob/main/contrib/systemd/gitea.service) 到 `/etc/systemd/system/gitea.service` 後用您喜愛的文字編輯器開啟檔案。
|
||||
|
||||
取消註解任何需要在此系統上啟動的服務像是 MySQL。
|
||||
|
||||
@@ -55,7 +55,7 @@ sudo apt install supervisor
|
||||
mkdir /home/git/gitea/log/supervisor
|
||||
```
|
||||
|
||||
附加範例 [supervisord config](https://github.com/go-gitea/gitea/blob/master/contrib/supervisor/gitea) 的設定值到 `/etc/supervisor/supervisord.conf`。
|
||||
附加範例 [supervisord config](https://github.com/go-gitea/gitea/blob/main/contrib/supervisor/gitea) 的設定值到 `/etc/supervisor/supervisord.conf`。
|
||||
|
||||
用您喜愛的文字編輯器修改使用者(git)和家目錄(/home/git)設定以符合部署環境。若預設埠已被占用請修改埠號或移除「-p」旗標。
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
---
|
||||
date: "2023-05-24T16:00:00+00:00"
|
||||
title: "Code Owners"
|
||||
slug: "code-owners"
|
||||
weight: 30
|
||||
toc: false
|
||||
draft: false
|
||||
aliases:
|
||||
- /en-us/code-owners
|
||||
menu:
|
||||
sidebar:
|
||||
parent: "usage"
|
||||
name: "Code Owners"
|
||||
weight: 30
|
||||
identifier: "code-owners"
|
||||
---
|
||||
|
||||
# Code Owners
|
||||
|
||||
Gitea maintains code owner files. It looks for it in the following locations in this order:
|
||||
|
||||
- `./CODEOWNERS`
|
||||
- `./docs/CODEOWNERS`
|
||||
- `./.gitea/CODEOWNERS`
|
||||
|
||||
And stops at the first found file.
|
||||
|
||||
File format: `<regexp rule> <@user or @org/team> [@user or @org/team]...`
|
||||
|
||||
Regexp specified in golang Regex format.
|
||||
Regexp can start with `!` for negative rules - match all files except specified.
|
||||
|
||||
Example file:
|
||||
|
||||
```
|
||||
.*\\.go @user1 @user2 # This is comment
|
||||
|
||||
# Comment too
|
||||
# You can assigning code owning for users or teams
|
||||
frontend/src/.*\\.js @org1/team1 @org1/team2 @user3
|
||||
|
||||
# You can use negative pattern
|
||||
!frontend/src/.* @org1/team3 @user5
|
||||
|
||||
# You can use power of go regexp
|
||||
docs/(aws|google|azure)/[^/]*\\.(md|txt) @user8 @org1/team4
|
||||
!/assets/.*\\.(bin|exe|msi) @user9
|
||||
```
|
||||
|
||||
### Escaping
|
||||
|
||||
You can escape characters `#`, ` ` (space) and `\` with `\`, like:
|
||||
|
||||
```
|
||||
dir/with\#hashtag @user1
|
||||
path\ with\ space @user2
|
||||
path/with\\backslash @user3
|
||||
```
|
||||
|
||||
Some character (`.+*?()|[]{}^$\`) should be escaped with `\\` inside regexp, like:
|
||||
|
||||
```
|
||||
path/\\.with\\.dots
|
||||
path/with\\+plus
|
||||
```
|
||||
@@ -70,7 +70,7 @@ Le but de ce projet est de fournir de la manière la plus simple, la plus rapide
|
||||
- MSSQL
|
||||
- [TiDB](https://github.com/pingcap/tidb) (MySQL protocol)
|
||||
- Fichier de configuration
|
||||
- Voir [ici](https://github.com/go-gitea/gitea/blob/master/custom/conf/app.example.ini)
|
||||
- Voir [ici](https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini)
|
||||
- Panel d'administration
|
||||
- Statistiques
|
||||
- Actions
|
||||
|
||||
@@ -71,7 +71,7 @@ Gitea 是從 [Gogs](http://gogs.io) Fork 出來的,請閱讀部落格文章 [G
|
||||
- MSSQL
|
||||
- TiDB(MySQL 協議)
|
||||
- 設定檔
|
||||
- [app.ini](https://github.com/go-gitea/gitea/blob/master/custom/conf/app.example.ini)
|
||||
- [app.ini](https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini)
|
||||
- 管理員面板
|
||||
- 系統摘要
|
||||
- 維護操作
|
||||
|
||||
Reference in New Issue
Block a user