Skip to content

Commit d017a10

Browse files
committed
Merge branch 'master' into feature/dismissing_reviews
* master: (28 commits) [Docs] Clone filters (go-gitea#14555) update docs to show latest stable version (1.13.2) (go-gitea#14550) Adding Chi's GetHead middleware (go-gitea#14541) Changelog v1.13.2 (go-gitea#14535) (go-gitea#14543) [skip ci] Updated translations via Crowdin [API] List, Check, Add & delete endpoints for repository teams (go-gitea#13630) [skip ci] Updated translations via Crowdin rm redirect (go-gitea#14534) Upgrade 'css-minimizer-webpack-plugin' to the latest version (go-gitea#14527) Set the name Mapper in migrations (go-gitea#14526) Internal ssh server respect Ciphers, MACs and KeyExchanges settings (go-gitea#14523) Move middlewares to web/middleware (go-gitea#14480) Add Doctor FixWrongUserType (go-gitea#14522) [skip ci] Updated translations via Crowdin noop (go-gitea#14521) Update docs and comments to remove macaron (go-gitea#14491) [skip ci] Updated translations via Crowdin Fix json charset bug (go-gitea#14514) enhancement: add signoff option in commit form (go-gitea#14516) Fix load time bug (go-gitea#14508) ...
2 parents 456db50 + bd28f1d commit d017a10

File tree

525 files changed

+32151
-14634
lines changed

Some content is hidden

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

525 files changed

+32151
-14634
lines changed

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,38 @@ This changelog goes through all the changes that have been made in each release
44
without substantial changes to our git log; to see the highlights of what has
55
been added to each release, please refer to the [blog](https://blog.gitea.io).
66

7+
## [1.13.2](https://github.com/go-gitea/gitea/releases/tag/v1.13.2) - 2021-01-31
8+
9+
* SECURITY
10+
* Prevent panic on fuzzer provided string (#14405) (#14409)
11+
* Add secure/httpOnly attributes to the lang cookie (#14279) (#14280)
12+
* API
13+
* If release publisher is deleted use ghost user (#14375)
14+
* BUGFIXES
15+
* Internal ssh server respect Ciphers, MACs and KeyExchanges settings (#14523) (#14530)
16+
* Set the name Mapper in migrations (#14526) (#14529)
17+
* Fix wiki preview (#14515)
18+
* Update code.gitea.io/sdk/gitea v0.13.1 -> v0.13.2 (#14497)
19+
* ChangeUserName: rename user files back on DB issue (#14447)
20+
* Fix lfs preview bug (#14428) (#14433)
21+
* Ensure timeout error is shown on u2f timeout (#14417) (#14431)
22+
* Fix Deadlock & Delete affected reactions on comment deletion (#14392) (#14425)
23+
* Use path not filepath in routers/editor (#14390) (#14396)
24+
* Check if label template exist first (#14384) (#14389)
25+
* Fix migration v141 (#14387) (#14388)
26+
* Use Request.URL.RequestURI() for fcgi (#14347)
27+
* Use ServerError provided by Context (#14333) (#14345)
28+
* Fix edit-label form init (#14337)
29+
* Fix mailIssueCommentBatch for pull request (#14252) (#14296)
30+
* Render links for commit hashes followed by comma (#14224) (#14227)
31+
* Send notifications for mentions in pulls, issues, (code-)comments (#14218) (#14221)
32+
* Fix avatar bugs (#14217) (#14220)
33+
* Ensure that schema search path is set with every connection on postgres (#14131) (#14216)
34+
* Fix dashboard issues labels filter bug (#14210) (#14214)
35+
* When visit /favicon.ico but the static file is not exist return 404 but not continue to handle the route (#14211) (#14213)
36+
* Fix branch selector on new issue page (#14194) (#14207)
37+
* Check for notExist on profile repository page (#14197) (#14203)
38+
739
## [1.13.1](https://github.com/go-gitea/gitea/releases/tag/v1.13.1) - 2020-12-29
840

941
* SECURITY

custom/conf/app.example.ini

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,8 +863,6 @@ ROOT_PATH =
863863
MODE = console
864864
; Buffer length of the channel, keep it as it is if you don't know what it is.
865865
BUFFER_LEN = 10000
866-
REDIRECT_MACARON_LOG = false
867-
MACARON = file
868866
; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Info"
869867
ROUTER_LOG_LEVEL = Info
870868
ROUTER = console

docker/root/etc/templates/app.ini

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ PATH = /data/gitea/attachments
4747
[log]
4848
MODE = console
4949
LEVEL = info
50-
REDIRECT_MACARON_LOG = true
51-
MACARON = console
5250
ROUTER = console
5351
ROOT_PATH = /data/gitea/log
5452

docs/config.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ params:
1818
description: Git with a cup of tea
1919
author: The Gitea Authors
2020
website: https://docs.gitea.io
21-
version: 1.13.1
21+
version: 1.13.2
2222
minGoVersion: 1.14
2323
goVersion: 1.15
2424
minNodeVersion: 10.13
@@ -147,27 +147,27 @@ languages:
147147
url: https://blog.gitea.io/
148148
weight: 30
149149
pre: rss
150-
- name: 程式碼
151-
url: https://code.gitea.io/
150+
- name: 商店
151+
url: https://shop.gitea.io/
152152
weight: 40
153-
pre: code
154-
- name: 翻译
153+
pre: shopping-cart
154+
- name: 翻譯
155155
url: https://crowdin.com/project/gitea
156156
weight: 41
157157
pre: language
158-
- name: 下载
158+
- name: 下載
159159
url: https://dl.gitea.io/
160160
weight: 50
161161
pre: download
162162
- name: GitHub
163163
url: https://github.com/go-gitea/
164164
weight: 60
165165
pre: github
166-
- name: Discord Chat
166+
- name: Discord 聊天室
167167
url: https://discord.gg/Gitea
168168
weight: 70
169169
pre: comment
170-
- name: Forum
170+
- name: 討論區
171171
url: https://discourse.gitea.io/
172172
weight: 80
173173
pre: group

docs/content/doc/advanced.zh-tw.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
date: "2016-12-01T16:00:00+02:00"
3+
title: "進階"
4+
slug: "advanced"
5+
weight: 30
6+
toc: false
7+
draft: false
8+
menu:
9+
sidebar:
10+
name: "進階"
11+
weight: 40
12+
identifier: "advanced"
13+
---
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
date: "2021-02-02"
3+
title: "Clone filters (partial clone)"
4+
slug: "clone-filters"
5+
weight: 25
6+
draft: false
7+
toc: false
8+
menu:
9+
sidebar:
10+
parent: "advanced"
11+
name: "Clone filters"
12+
weight: 25
13+
identifier: "clone-filters"
14+
---
15+
16+
# Clone filters (partial clone)
17+
18+
Git introduces `--filter` option to `git clone` command, which filters out
19+
large files and objects (such as blobs) to create partial clone of a repo.
20+
Clone filters are especially useful for large repo and/or metered connection,
21+
where full clone (without `--filter`) can be expensive (as all history data
22+
must be downloaded).
23+
24+
This requires Git version 2.22 or later, both on the Gitea server and on the
25+
client. For clone filters to work properly, make sure that Git version
26+
on the client is at least the same as on the server (or later). Login to
27+
Gitea server as admin and head to Site Administration -> Configuration to
28+
see Git version of the server.
29+
30+
By default, clone filters are disabled, which cause the server to ignore
31+
`--filter` option.
32+
33+
To enable clone filters on per-repo basis, edit the repo's `config` on
34+
repository location. Consult `ROOT` option on `repository` section of
35+
Gitea configuration (`app.ini`) for the exact location. For example, to
36+
enable clone filters for `some-repo`, edit
37+
`/var/gitea/data/gitea-repositories/some-user/some-repo.git/config` and add:
38+
39+
```ini
40+
[uploadpack]
41+
allowfilter = true
42+
```
43+
44+
To enable clone filters globally, add that config above to `~/.gitconfig`
45+
of user that run Gitea (for example `git`).
46+
47+
Alternatively, you can use `git config` to set the option.
48+
49+
To enable for a specific repo:
50+
51+
```bash
52+
cd /var/gitea/data/gitea-repositories/some-user/some-repo.git
53+
git config --local uploadpack.allowfilter true
54+
```
55+
To enable globally, login as user that run Gitea and:
56+
57+
```bash
58+
git config --global uploadpack.allowfilter true
59+
```
60+
61+
See [GitHub blog post: Get up to speed with partial clone](https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/)
62+
for common use cases of clone filters (blobless and treeless clones), and
63+
[Gitlab docs for partial clone](https://docs.gitlab.com/ee/topics/git/partial_clone.html)
64+
for more advanced use cases (such as filter by file size and remove
65+
filters to turn partial clone into full clone).

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ Default templates for project boards:
611611
- `STACKTRACE_LEVEL`: **None**: Default log level at which to log create stack traces. \[Trace, Debug, Info, Warn, Error, Critical, Fatal, None\]
612612
- `ROUTER_LOG_LEVEL`: **Info**: The log level that the router should log at. (If you are setting the access log, its recommended to place this at Debug.)
613613
- `ROUTER`: **console**: The mode or name of the log the router should log to. (If you set this to `,` it will log to default gitea logger.)
614-
NB: You must `REDIRECT_MACARON_LOG` and have `DISABLE_ROUTER_LOG` set to `false` for this option to take effect. Configure each mode in per mode log subsections `\[log.modename.router\]`.
614+
NB: You must have `DISABLE_ROUTER_LOG` set to `false` for this option to take effect. Configure each mode in per mode log subsections `\[log.modename.router\]`.
615615
- `ENABLE_ACCESS_LOG`: **false**: Creates an access.log in NCSA common log format, or as per the following template
616616
- `ACCESS`: **file**: Logging mode for the access logger, use a comma to separate values. Configure each mode in per mode log subsections `\[log.modename.access\]`. By default the file mode will log to `$ROOT_PATH/access.log`. (If you set this to `,` it will log to the default gitea logger.)
617617
- `ACCESS_LOG_TEMPLATE`: **`{{.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}}"`**: Sets the template used to create the access log.

docs/content/doc/advanced/environment-variables.en-us.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,6 @@ For documentation about each of the variables available, refer to the
5858
- `HOMEDRIVE`: Main drive path used to access the home directory (C:)
5959
- `HOMEPATH`: Home relative path in the given home drive path
6060

61-
## Macaron (framework used by Gitea)
62-
63-
- `HOST`: Host Macaron will listen on
64-
- `PORT`: Port Macaron will listen on
65-
- `MACARON_ENV`: global variable to provide special functionality for development environments
66-
vs. production environments. If MACARON_ENV is set to "" or "development", then templates will
67-
be recompiled on every request. For more performance, set the MACARON_ENV environment variable
68-
to "production".
69-
7061
## Miscellaneous
7162

7263
- `SKIP_MINWINSVC`: If set to 1, do not run as a service on Windows.

docs/content/doc/advanced/environment-variables.zh-cn.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,6 @@ GITEA_CUSTOM=/home/gitea/custom ./gitea web
5050
* `HOMEDRIVE`: 用于访问 home 目录的主驱动器路径(C盘)
5151
* `HOMEPATH`:在指定主驱动器下的 home 目录相对路径
5252

53-
## Macaron(Gitea 使用的 web 框架)
54-
55-
* `HOST`:Macaron 监听的主机地址
56-
* `PORT`:Macaron 监听的端口地址
57-
* `MACARON_ENV`:为开发环境和生产环境提供特殊功能性配置的全局变量,当 MACARON_ENV 设置为 "" 或 "development"
58-
时,每次请求都会重编译页面模板。为了提高性能表现,可将它设置为 "production"。
59-
6053
## Miscellaneous
6154

6255
* `SKIP_MINWINSVC`:如果设置为 1,在 Windows 上不会以 service 的形式运行。

docs/content/doc/advanced/logging-documentation.en-us.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ The fundamental thing to be aware of in Gitea is that there are several
2727
log groups:
2828

2929
- The "Default" logger
30-
- The Macaron logger
3130
- The Router logger
3231
- The Access logger
3332
- The XORM logger
@@ -74,8 +73,7 @@ You can disable Router log by setting `DISABLE_ROUTER_LOG`.
7473
You can configure the outputs of this
7574
router log by setting the `ROUTER` value in the `[log]` section of the
7675
configuration. `ROUTER` will default to `console` if unset. The Gitea
77-
Router logs the same data as the Macaron log but has slightly different
78-
coloring. It logs at the `Info` level by default, but this can be
76+
Router logs at the `Info` level by default, but this can be
7977
changed if desired by setting the `ROUTER_LOG_LEVEL` value.
8078

8179
Please note, setting the `LEVEL` of this logger to a level above
@@ -182,7 +180,7 @@ Certain configuration is common to all modes of log output:
182180
- `STACKTRACE_LEVEL` is the lowest level that this output will print
183181
a stacktrace. This value is inherited.
184182
- `MODE` is the mode of the log output. It will default to the sublogger
185-
name. Thus `[log.console.macaron]` will default to `MODE = console`.
183+
name. Thus `[log.console.router]` will default to `MODE = console`.
186184
- `COLORIZE` will default to `true` for `console` as
187185
described, otherwise it will default to `false`.
188186

@@ -280,8 +278,6 @@ LOG_SQL = false ; SQL logs are rarely helpful unless we specifically ask for the
280278
[log]
281279
MODE = console
282280
LEVEL = debug ; please set the level to debug when we are debugging a problem
283-
REDIRECT_MACARON_LOG = true
284-
MACARON = console
285281
ROUTER = console
286282
COLORIZE = false ; this can be true if you can strip out the ansi coloring
287283
```
@@ -314,7 +310,6 @@ ROOT_PATH = %(GITEA_WORK_DIR)/log
314310
MODE = console
315311
LEVEL = Info
316312
STACKTRACE_LEVEL = None
317-
REDIRECT_MACARON_LOG = false
318313
ENABLE_ACCESS_LOG = false
319314
ENABLE_XORM_LOG = true
320315
XORM = ,
@@ -345,7 +340,7 @@ recommended that pausing only done for a very short period of time.
345340
## Adding and removing logging whilst Gitea is running
346341

347342
It is possible to add and remove logging whilst Gitea is running using the `gitea manager logging add` and `remove` subcommands.
348-
This functionality can only adjust running log systems and cannot be used to start the access, macaron or router loggers if they
343+
This functionality can only adjust running log systems and cannot be used to start the access or router loggers if they
349344
were not already initialised. If you wish to start these systems you are advised to adjust the app.ini and (gracefully) restart
350345
the Gitea service.
351346

docs/content/doc/developers.zh-tw.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
date: "2016-12-01T16:00:00+02:00"
3+
title: "開發人員"
4+
slug: "developers"
5+
weight: 40
6+
toc: false
7+
draft: false
8+
menu:
9+
sidebar:
10+
name: "開發人員"
11+
weight: 50
12+
identifier: "developers"
13+
---
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
date: "2019-04-15T17:29:00+08:00"
3+
title: "整合"
4+
slug: "integrations"
5+
weight: 40
6+
toc: false
7+
draft: false
8+
menu:
9+
sidebar:
10+
parent: "developers"
11+
name: "整合"
12+
weight: 65
13+
identifier: "integrations"
14+
---
15+
16+
# 整合
17+
18+
Gitea 有著很棒的第三方整合社群, 以及其它有著一流支援的專案。
19+
20+
我們持續的整理一份清單以追蹤他們!請到 [awesome-gitea](https://gitea.com/gitea/awesome-gitea) 查看。
21+
22+
如果您正在找尋有關 [CI/CD](https://gitea.com/gitea/awesome-gitea#devops)[SDK](https://gitea.com/gitea/awesome-gitea#sdk) 或是其它佈景主題,您可以在存儲庫 [awesome-gitea](https://gitea.com/gitea/awesome-gitea) 找到他們。
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
date: "2019-04-15T17:29:00+08:00"
3+
title: "遷移介面"
4+
slug: "migrations-interfaces"
5+
weight: 30
6+
toc: false
7+
draft: false
8+
menu:
9+
sidebar:
10+
parent: "developers"
11+
name: "遷移介面"
12+
weight: 55
13+
identifier: "migrations-interfaces"
14+
---
15+
16+
# 遷移功能
17+
18+
完整的遷移從 Gitea 1.9.0 開始提供。它定義了兩個介面用來從其它 Git 託管平臺遷移儲存庫資料到 Gitea,未來或許會提供遷移到其它 git 託管平臺。
19+
目前已實作了從 Github, Gitlab 和其它 Gitea 遷移資料。
20+
21+
Gitea 定義了一些基本物件於套件 [modules/migrations/base](https://github.com/go-gitea/gitea/tree/master/modules/migrations/base)
22+
分別是 `Repository`, `Milestone`, `Release`, `ReleaseAsset`, `Label`, `Issue`, `Comment`, `PullRequest`, `Reaction`, `Review`, `ReviewComment`
23+
24+
## Downloader 介面
25+
26+
從新的 Git 託管平臺遷移,有兩個新的步驟。
27+
28+
- 您必須實作一個 `Downloader`,它用來取得儲存庫資訊。
29+
- 您必須實作一個 `DownloaderFactory`,它用來偵測 URL 是否符合並建立上述的 `Downloader`
30+
- 您需要在 `init()` 透過 `RegisterDownloaderFactory` 來註冊 `DownloaderFactory`
31+
32+
您可以在 [downloader.go](https://github.com/go-gitea/gitea/blob/master/modules/migrations/base/downloader.go) 中找到這些介面。
33+
34+
## Uploader 介面
35+
36+
目前只有 `GiteaLocalUploader` 被實作出來,所以我們只能通過 `Uploader` 儲存已下載的資料到本地的 Gitea 實例。
37+
目前尚未支援其它 Uploader。
38+
39+
您可以在 [uploader.go](https://github.com/go-gitea/gitea/blob/master/modules/migrations/base/uploader.go) 中找到這些介面。

0 commit comments

Comments
 (0)