Skip to content

Commit

Permalink
Merge branch 'master' into feature/dismissing_reviews
Browse files Browse the repository at this point in the history
* 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)
  ...
  • Loading branch information
a1012112796 committed Feb 3, 2021
2 parents 456db50 + bd28f1d commit d017a10
Show file tree
Hide file tree
Showing 525 changed files with 32,151 additions and 14,634 deletions.
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,38 @@ This changelog goes through all the changes that have been made in each release
without substantial changes to our git log; to see the highlights of what has
been added to each release, please refer to the [blog](https://blog.gitea.io).

## [1.13.2](https://github.com/go-gitea/gitea/releases/tag/v1.13.2) - 2021-01-31

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

## [1.13.1](https://github.com/go-gitea/gitea/releases/tag/v1.13.1) - 2020-12-29

* SECURITY
Expand Down
2 changes: 0 additions & 2 deletions custom/conf/app.example.ini
Original file line number Diff line number Diff line change
Expand Up @@ -863,8 +863,6 @@ ROOT_PATH =
MODE = console
; Buffer length of the channel, keep it as it is if you don't know what it is.
BUFFER_LEN = 10000
REDIRECT_MACARON_LOG = false
MACARON = file
; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Info"
ROUTER_LOG_LEVEL = Info
ROUTER = console
Expand Down
2 changes: 0 additions & 2 deletions docker/root/etc/templates/app.ini
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ PATH = /data/gitea/attachments
[log]
MODE = console
LEVEL = info
REDIRECT_MACARON_LOG = true
MACARON = console
ROUTER = console
ROOT_PATH = /data/gitea/log

Expand Down
16 changes: 8 additions & 8 deletions docs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ params:
description: Git with a cup of tea
author: The Gitea Authors
website: https://docs.gitea.io
version: 1.13.1
version: 1.13.2
minGoVersion: 1.14
goVersion: 1.15
minNodeVersion: 10.13
Expand Down Expand Up @@ -147,27 +147,27 @@ languages:
url: https://blog.gitea.io/
weight: 30
pre: rss
- name: 程式碼
url: https://code.gitea.io/
- name: 商店
url: https://shop.gitea.io/
weight: 40
pre: code
- name: 翻译
pre: shopping-cart
- name: 翻譯
url: https://crowdin.com/project/gitea
weight: 41
pre: language
- name: 下载
- name: 下載
url: https://dl.gitea.io/
weight: 50
pre: download
- name: GitHub
url: https://github.com/go-gitea/
weight: 60
pre: github
- name: Discord Chat
- name: Discord 聊天室
url: https://discord.gg/Gitea
weight: 70
pre: comment
- name: Forum
- name: 討論區
url: https://discourse.gitea.io/
weight: 80
pre: group
Expand Down
13 changes: 13 additions & 0 deletions docs/content/doc/advanced.zh-tw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "進階"
slug: "advanced"
weight: 30
toc: false
draft: false
menu:
sidebar:
name: "進階"
weight: 40
identifier: "advanced"
---
65 changes: 65 additions & 0 deletions docs/content/doc/advanced/clone-filter.en-us.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
date: "2021-02-02"
title: "Clone filters (partial clone)"
slug: "clone-filters"
weight: 25
draft: false
toc: false
menu:
sidebar:
parent: "advanced"
name: "Clone filters"
weight: 25
identifier: "clone-filters"
---

# Clone filters (partial clone)

Git introduces `--filter` option to `git clone` command, which filters out
large files and objects (such as blobs) to create partial clone of a repo.
Clone filters are especially useful for large repo and/or metered connection,
where full clone (without `--filter`) can be expensive (as all history data
must be downloaded).

This requires Git version 2.22 or later, both on the Gitea server and on the
client. For clone filters to work properly, make sure that Git version
on the client is at least the same as on the server (or later). Login to
Gitea server as admin and head to Site Administration -> Configuration to
see Git version of the server.

By default, clone filters are disabled, which cause the server to ignore
`--filter` option.

To enable clone filters on per-repo basis, edit the repo's `config` on
repository location. Consult `ROOT` option on `repository` section of
Gitea configuration (`app.ini`) for the exact location. For example, to
enable clone filters for `some-repo`, edit
`/var/gitea/data/gitea-repositories/some-user/some-repo.git/config` and add:

```ini
[uploadpack]
allowfilter = true
```

To enable clone filters globally, add that config above to `~/.gitconfig`
of user that run Gitea (for example `git`).

Alternatively, you can use `git config` to set the option.

To enable for a specific repo:

```bash
cd /var/gitea/data/gitea-repositories/some-user/some-repo.git
git config --local uploadpack.allowfilter true
```
To enable globally, login as user that run Gitea and:

```bash
git config --global uploadpack.allowfilter true
```

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/)
for common use cases of clone filters (blobless and treeless clones), and
[Gitlab docs for partial clone](https://docs.gitlab.com/ee/topics/git/partial_clone.html)
for more advanced use cases (such as filter by file size and remove
filters to turn partial clone into full clone).
2 changes: 1 addition & 1 deletion docs/content/doc/advanced/config-cheat-sheet.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ Default templates for project boards:
- `STACKTRACE_LEVEL`: **None**: Default log level at which to log create stack traces. \[Trace, Debug, Info, Warn, Error, Critical, Fatal, None\]
- `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.)
- `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.)
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\]`.
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\]`.
- `ENABLE_ACCESS_LOG`: **false**: Creates an access.log in NCSA common log format, or as per the following template
- `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.)
- `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.
Expand Down
9 changes: 0 additions & 9 deletions docs/content/doc/advanced/environment-variables.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,6 @@ For documentation about each of the variables available, refer to the
- `HOMEDRIVE`: Main drive path used to access the home directory (C:)
- `HOMEPATH`: Home relative path in the given home drive path

## Macaron (framework used by Gitea)

- `HOST`: Host Macaron will listen on
- `PORT`: Port Macaron will listen on
- `MACARON_ENV`: global variable to provide special functionality for development environments
vs. production environments. If MACARON_ENV is set to "" or "development", then templates will
be recompiled on every request. For more performance, set the MACARON_ENV environment variable
to "production".

## Miscellaneous

- `SKIP_MINWINSVC`: If set to 1, do not run as a service on Windows.
7 changes: 0 additions & 7 deletions docs/content/doc/advanced/environment-variables.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ GITEA_CUSTOM=/home/gitea/custom ./gitea web
* `HOMEDRIVE`: 用于访问 home 目录的主驱动器路径(C盘)
* `HOMEPATH`:在指定主驱动器下的 home 目录相对路径

## Macaron(Gitea 使用的 web 框架)

* `HOST`:Macaron 监听的主机地址
* `PORT`:Macaron 监听的端口地址
* `MACARON_ENV`:为开发环境和生产环境提供特殊功能性配置的全局变量,当 MACARON_ENV 设置为 "" 或 "development"
时,每次请求都会重编译页面模板。为了提高性能表现,可将它设置为 "production"。

## Miscellaneous

* `SKIP_MINWINSVC`:如果设置为 1,在 Windows 上不会以 service 的形式运行。
11 changes: 3 additions & 8 deletions docs/content/doc/advanced/logging-documentation.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ The fundamental thing to be aware of in Gitea is that there are several
log groups:

- The "Default" logger
- The Macaron logger
- The Router logger
- The Access logger
- The XORM logger
Expand Down Expand Up @@ -74,8 +73,7 @@ You can disable Router log by setting `DISABLE_ROUTER_LOG`.
You can configure the outputs of this
router log by setting the `ROUTER` value in the `[log]` section of the
configuration. `ROUTER` will default to `console` if unset. The Gitea
Router logs the same data as the Macaron log but has slightly different
coloring. It logs at the `Info` level by default, but this can be
Router logs at the `Info` level by default, but this can be
changed if desired by setting the `ROUTER_LOG_LEVEL` value.

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

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

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

Expand Down
13 changes: 13 additions & 0 deletions docs/content/doc/developers.zh-tw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "開發人員"
slug: "developers"
weight: 40
toc: false
draft: false
menu:
sidebar:
name: "開發人員"
weight: 50
identifier: "developers"
---
22 changes: 22 additions & 0 deletions docs/content/doc/developers/integrations.zh-tw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
date: "2019-04-15T17:29:00+08:00"
title: "整合"
slug: "integrations"
weight: 40
toc: false
draft: false
menu:
sidebar:
parent: "developers"
name: "整合"
weight: 65
identifier: "integrations"
---

# 整合

Gitea 有著很棒的第三方整合社群, 以及其它有著一流支援的專案。

我們持續的整理一份清單以追蹤他們!請到 [awesome-gitea](https://gitea.com/gitea/awesome-gitea) 查看。

如果您正在找尋有關 [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) 找到他們。
39 changes: 39 additions & 0 deletions docs/content/doc/developers/migrations.zh-tw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
date: "2019-04-15T17:29:00+08:00"
title: "遷移介面"
slug: "migrations-interfaces"
weight: 30
toc: false
draft: false
menu:
sidebar:
parent: "developers"
name: "遷移介面"
weight: 55
identifier: "migrations-interfaces"
---

# 遷移功能

完整的遷移從 Gitea 1.9.0 開始提供。它定義了兩個介面用來從其它 Git 託管平臺遷移儲存庫資料到 Gitea,未來或許會提供遷移到其它 git 託管平臺。
目前已實作了從 Github, Gitlab 和其它 Gitea 遷移資料。

Gitea 定義了一些基本物件於套件 [modules/migrations/base](https://github.com/go-gitea/gitea/tree/master/modules/migrations/base)
分別是 `Repository`, `Milestone`, `Release`, `ReleaseAsset`, `Label`, `Issue`, `Comment`, `PullRequest`, `Reaction`, `Review`, `ReviewComment`

## Downloader 介面

從新的 Git 託管平臺遷移,有兩個新的步驟。

- 您必須實作一個 `Downloader`,它用來取得儲存庫資訊。
- 您必須實作一個 `DownloaderFactory`,它用來偵測 URL 是否符合並建立上述的 `Downloader`
- 您需要在 `init()` 透過 `RegisterDownloaderFactory` 來註冊 `DownloaderFactory`

您可以在 [downloader.go](https://github.com/go-gitea/gitea/blob/master/modules/migrations/base/downloader.go) 中找到這些介面。

## Uploader 介面

目前只有 `GiteaLocalUploader` 被實作出來,所以我們只能通過 `Uploader` 儲存已下載的資料到本地的 Gitea 實例。
目前尚未支援其它 Uploader。

您可以在 [uploader.go](https://github.com/go-gitea/gitea/blob/master/modules/migrations/base/uploader.go) 中找到這些介面。
Loading

0 comments on commit d017a10

Please sign in to comment.