Skip to content

Commit a74b473

Browse files
authored
Merge branch 'master' into graceful-queues
2 parents 52ee212 + f71e1c8 commit a74b473

File tree

12 files changed

+83
-27
lines changed

12 files changed

+83
-27
lines changed

custom/conf/app.ini.sample

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,8 @@ ENABLE_GZIP = false
290290
ENABLE_PPROF = false
291291
; PPROF_DATA_PATH, use an absolute path when you start gitea as service
292292
PPROF_DATA_PATH = data/tmp/pprof
293-
; Landing page, can be "home", "explore", or "organizations"
293+
; Landing page, can be "home", "explore", "organizations" or "login"
294+
; The "login" choice is not a security measure but just a UI flow change, use REQUIRE_SIGNIN_VIEW to force users to log in.
294295
LANDING_PAGE = home
295296
; Enables git-lfs support. true or false, default is false.
296297
LFS_START_SERVER = false

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
186186
- `STATIC_ROOT_PATH`: **./**: Upper level of template and static files path.
187187
- `STATIC_CACHE_TIME`: **6h**: Web browser cache time for static resources on `custom/`, `public/` and all uploaded avatars.
188188
- `ENABLE_GZIP`: **false**: Enables application-level GZIP support.
189-
- `LANDING_PAGE`: **home**: Landing page for unauthenticated users \[home, explore\].
189+
- `LANDING_PAGE`: **home**: Landing page for unauthenticated users \[home, explore, organizations, login\].
190190
- `LFS_START_SERVER`: **false**: Enables git-lfs support.
191191
- `LFS_CONTENT_PATH`: **./data/lfs**: Where to store LFS files.
192192
- `LFS_JWT_SECRET`: **\<empty\>**: LFS authentication secret, change this a unique string.

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ environment variable; this can be used to override the default path to something
4444

4545
**Note:** Gitea must perform a full restart to see configuration changes.
4646

47-
## Customizing /robots.txt
48-
49-
To make Gitea serve a custom `/robots.txt` (default: empty 404), create a file called
50-
`robots.txt` in the `custom` folder (or `CustomPath`) with
51-
[expected contents](http://www.robotstxt.org/).
52-
5347
## Serving custom public files
5448

5549
To make Gitea serve custom public files (like pages and images), use the folder
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
date: "2019-12-31T13:55:00+05:00"
3+
title: "Advanced: Search Engines Indexation"
4+
slug: "search-engines-indexation"
5+
weight: 30
6+
toc: true
7+
draft: false
8+
menu:
9+
sidebar:
10+
parent: "advanced"
11+
name: "Search Engines Indexation"
12+
weight: 60
13+
identifier: "search-engines-indexation"
14+
---
15+
16+
# Search engines indexation of your Gitea installation
17+
18+
By default your Gitea installation will be indexed by search engines.
19+
If you don't want your repository to be visible for search engines read further.
20+
21+
## Block search engines indexation using robots.txt
22+
23+
To make Gitea serve a custom `robots.txt` (default: empty 404) for top level installations,
24+
create a file called `robots.txt` in the [`custom` folder or `CustomPath`]({{< relref "doc/advanced/customizing-gitea.en-us.md" >}})
25+
26+
Examples on how to configure the `robots.txt` can be found at [https://moz.com/learn/seo/robotstxt](https://moz.com/learn/seo/robotstxt).
27+
28+
29+
```txt
30+
User-agent: *
31+
Disallow: /
32+
```
33+
34+
If you installed Gitea in a subdirectory, you will need to create or edit the `robots.txt` in the top level directory.
35+
36+
```txt
37+
User-agent: *
38+
Disallow: /gitea/
39+
```

integrations/setting_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,10 @@ func TestSettingLandingPage(t *testing.T) {
9999
resp = MakeRequest(t, req, http.StatusFound)
100100
assert.Equal(t, "/explore/organizations", resp.Header().Get("Location"))
101101

102+
setting.LandingPageURL = setting.LandingPageLogin
103+
req = NewRequest(t, "GET", "/")
104+
resp = MakeRequest(t, req, http.StatusFound)
105+
assert.Equal(t, "/user/login", resp.Header().Get("Location"))
106+
102107
setting.LandingPageURL = landingPage
103108
}

modules/setting/setting.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ const (
5454
LandingPageHome LandingPage = "/"
5555
LandingPageExplore LandingPage = "/explore"
5656
LandingPageOrganizations LandingPage = "/explore/organizations"
57+
LandingPageLogin LandingPage = "/user/login"
5758
)
5859

5960
// enumerates all the types of captchas
@@ -648,6 +649,8 @@ func NewContext() {
648649
LandingPageURL = LandingPageExplore
649650
case "organizations":
650651
LandingPageURL = LandingPageOrganizations
652+
case "login":
653+
LandingPageURL = LandingPageLogin
651654
default:
652655
LandingPageURL = LandingPageHome
653656
}

options/locale/locale_de-DE.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ link_account=Account verbinden
1010
register=Registrieren
1111
website=Webseite
1212
version=Version
13+
powered_by=Powered by %s
1314
page=Seite
1415
template=Template
1516
language=Sprache
@@ -1053,6 +1054,7 @@ pulls.is_checking=Die Konfliktprüfung läuft noch. Bitte aktualisiere die Seite
10531054
pulls.required_status_check_failed=Einige erforderliche Prüfungen waren nicht erfolgreich.
10541055
pulls.required_status_check_administrator=Als Administrator kannst du diesen Pull-Request weiterhin zusammenführen.
10551056
pulls.blocked_by_approvals=Dieser Pull-Request hat noch nicht genügend Zustimmungen. %d von %d Zustimmungen erteilt.
1057+
pulls.blocked_by_rejection=Dieser Pull-Request hat Änderungen, die von einem offiziellen Reviewer angefragt wurden.
10561058
pulls.can_auto_merge_desc=Dieser Pull-Request kann automatisch zusammengeführt werden.
10571059
pulls.cannot_auto_merge_desc=Dieser Pull-Request kann nicht automatisch zusammengeführt werden, da es Konflikte gibt.
10581060
pulls.cannot_auto_merge_helper=Bitte manuell zusammenführen, um die Konflikte zu lösen.
@@ -1416,6 +1418,8 @@ settings.update_protect_branch_success=Branch-Schutz für den Branch „%s“ wu
14161418
settings.remove_protected_branch_success=Branch-Schutz für den Branch „%s“ wurde deaktiviert.
14171419
settings.protected_branch_deletion=Branch-Schutz deaktivieren
14181420
settings.protected_branch_deletion_desc=Wenn du den Branch-Schutz deaktivierst, können alle Nutzer mit Schreibrechten auf den Branch pushen. Fortfahren?
1421+
settings.block_rejected_reviews=Merge bei abgelehnten Reviews blockieren
1422+
settings.block_rejected_reviews_desc=Mergen ist nicht möglich, wenn Änderungen durch offizielle Reviewer angefragt werden, auch wenn es genügend Zustimmungen gibt.
14191423
settings.default_branch_desc=Wähle einen Standardbranch für Pull-Requests und Code-Commits:
14201424
settings.choose_branch=Wähle einen Branch …
14211425
settings.no_protected_branch=Es gibt keine geschützten Branches.

options/locale/locale_fr-FR.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,7 @@ activity.git_stats_deletion_n=%d suppressions
11941194

11951195
search=Chercher
11961196
search.search_repo=Rechercher dans le dépôt
1197-
search.results=Résulats de la recherche « %s » dans <a href="%s"> %s</a>
1197+
search.results=Résultats de la recherche « %s » dans <a href="%s"> %s</a>
11981198

11991199
settings=Paramètres
12001200
settings.desc=Les paramètres sont l'endroit où gérer les options du dépôt

options/locale/locale_ja-JP.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ link_account=アカウント連携
1010
register=登録
1111
website=Webサイト
1212
version=バージョン
13+
powered_by=Powered by %s
1314
page=ページ
1415
template=テンプレート
1516
language=言語
@@ -1053,6 +1054,7 @@ pulls.is_checking=マージのコンフリクトを確認中です。 少し待
10531054
pulls.required_status_check_failed=いくつかの必要なステータスチェックが成功していません。
10541055
pulls.required_status_check_administrator=管理者であるため、このプルリクエストをマージすることは可能です。
10551056
pulls.blocked_by_approvals=このプルリクエストはまだ承認数が足りません。 %[1]d/%[2]dの承認を得ています。
1057+
pulls.blocked_by_rejection=このプルリクエストは公式レビューアにより変更要請されています。
10561058
pulls.can_auto_merge_desc=このプルリクエストは自動的にマージできます。
10571059
pulls.cannot_auto_merge_desc=コンフリクトが存在するため、このプルリクエストは自動的にマージできません。
10581060
pulls.cannot_auto_merge_helper=コンフリクトを解消するため手動でマージしてください。
@@ -1416,6 +1418,8 @@ settings.update_protect_branch_success=ブランチ '%s' の保護を更新し
14161418
settings.remove_protected_branch_success=ブランチ '%s' の保護を無効にしました。
14171419
settings.protected_branch_deletion=ブランチ保護の無効化
14181420
settings.protected_branch_deletion_desc=ブランチ保護を無効にすると、書き込み権限を持つユーザーにブランチへのプッシュを許可することになります。 続行しますか?
1421+
settings.block_rejected_reviews=不承認レビューでマージをブロック
1422+
settings.block_rejected_reviews_desc=公式レビューアが変更を要請しているときは、承認数を満たしていても、マージできないようにします。
14191423
settings.default_branch_desc=プルリクエストやコミット表示のデフォルトのブランチを選択:
14201424
settings.choose_branch=ブランチを選択…
14211425
settings.no_protected_branch=保護しているブランチはありません。

options/locale/locale_zh-CN.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ link_account=链接帐户
1010
register=注册
1111
website=官方网站
1212
version=当前版本
13+
powered_by=Powered by %s
1314
page=页面
1415
template=模板
1516
language=语言选项
@@ -959,6 +960,7 @@ issues.add_time=手动添加时间
959960
issues.add_time_short=添加时间
960961
issues.add_time_cancel=取消
961962
issues.add_time_history=`添加耗时 %s`
963+
issues.del_time_history=`已删除时间 %s`
962964
issues.add_time_hours=小时
963965
issues.add_time_minutes=分钟
964966
issues.add_time_sum_to_small=没有输入时间。
@@ -1052,6 +1054,7 @@ pulls.is_checking=正在进行合并冲突检测,请稍后再试。
10521054
pulls.required_status_check_failed=一些必要的检查没有成功。
10531055
pulls.required_status_check_administrator=作为管理员,您仍可合并此合并请求。
10541056
pulls.blocked_by_approvals=此合并请求没有通过审批。已获取审批数%d个,共需要审批数%d个。
1057+
pulls.blocked_by_rejection=此合并请求有官方审核员请求的更改。
10551058
pulls.can_auto_merge_desc=该合并请求可以进行自动合并操作。
10561059
pulls.cannot_auto_merge_desc=该合并请求存在冲突,无法进行自动合并操作。
10571060
pulls.cannot_auto_merge_helper=手动合并解决此冲突
@@ -1415,6 +1418,8 @@ settings.update_protect_branch_success=分支 "%s" 的分支保护已更新。
14151418
settings.remove_protected_branch_success=分支 "%s" 的分支保护已被禁用。
14161419
settings.protected_branch_deletion=禁用分支保护
14171420
settings.protected_branch_deletion_desc=禁用分支保护允许具有写入权限的用户推送提交到此分支。继续?
1421+
settings.block_rejected_reviews=拒绝审核阻止了此合并
1422+
settings.block_rejected_reviews_desc=如果官方审查人员要求作出改动,即使有足够的批准,合并也不允许。
14181423
settings.default_branch_desc=请选择一个默认的分支用于合并请求和提交:
14191424
settings.choose_branch=选择一个分支...
14201425
settings.no_protected_branch=没有受保护的分支
@@ -2046,6 +2051,7 @@ create_pull_request=`创建了合并请求 <a href="%s/pulls/%s">%s#%[2]s</a>`
20462051
close_pull_request=`关闭了合并请求 <a href="%s/pulls/%s">%s#%[2]s</a>`
20472052
reopen_pull_request=`重新开启了合并请求 <a href="%s/pulls/%s">%s#%[2]s</a>`
20482053
comment_issue=`评论了工单 <a href="%s/issues/%s">%s#%[2]s</a>`
2054+
comment_pull=`评论了合并请求 <a href="%s/pulls/%s">%s#%[2]s</a>`
20492055
merge_pull_request=`合并了合并请求 <a href="%s/pulls/%s">%s#%[2]s</a>`
20502056
transfer_repo=将仓库 <code>%s</code> 转移至 <a href="%s">%s</a>
20512057
push_tag=推送了标签 <a href="%s/src/tag/%s">%[2]s</a> 到 <a href="%[1]s">%[3]s</a>

routers/api/v1/repo/issue_reaction.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ import (
1313
api "code.gitea.io/gitea/modules/structs"
1414
)
1515

16-
// GetIssueCommentReactions list reactions of a issue comment
16+
// GetIssueCommentReactions list reactions of a comment from an issue
1717
func GetIssueCommentReactions(ctx *context.APIContext) {
1818
// swagger:operation GET /repos/{owner}/{repo}/issues/comments/{id}/reactions issue issueGetCommentReactions
1919
// ---
20-
// summary: Get a list reactions of a issue comment
20+
// summary: Get a list of reactions from a comment of an issue
2121
// consumes:
2222
// - application/json
2323
// produces:
@@ -83,11 +83,11 @@ func GetIssueCommentReactions(ctx *context.APIContext) {
8383
ctx.JSON(http.StatusOK, result)
8484
}
8585

86-
// PostIssueCommentReaction add a reaction to a comment of a issue
86+
// PostIssueCommentReaction add a reaction to a comment of an issue
8787
func PostIssueCommentReaction(ctx *context.APIContext, form api.EditReactionOption) {
8888
// swagger:operation POST /repos/{owner}/{repo}/issues/comments/{id}/reactions issue issuePostCommentReaction
8989
// ---
90-
// summary: Add a reaction to a comment of a issue comment
90+
// summary: Add a reaction to a comment of an issue
9191
// consumes:
9292
// - application/json
9393
// produces:
@@ -124,11 +124,11 @@ func PostIssueCommentReaction(ctx *context.APIContext, form api.EditReactionOpti
124124
changeIssueCommentReaction(ctx, form, true)
125125
}
126126

127-
// DeleteIssueCommentReaction list reactions of a issue comment
127+
// DeleteIssueCommentReaction remove a reaction from a comment of an issue
128128
func DeleteIssueCommentReaction(ctx *context.APIContext, form api.EditReactionOption) {
129129
// swagger:operation DELETE /repos/{owner}/{repo}/issues/comments/{id}/reactions issue issueDeleteCommentReaction
130130
// ---
131-
// summary: Remove a reaction from a comment of a issue comment
131+
// summary: Remove a reaction from a comment of an issue
132132
// consumes:
133133
// - application/json
134134
// produces:
@@ -219,11 +219,11 @@ func changeIssueCommentReaction(ctx *context.APIContext, form api.EditReactionOp
219219
}
220220
}
221221

222-
// GetIssueReactions list reactions of a issue comment
222+
// GetIssueReactions list reactions of an issue
223223
func GetIssueReactions(ctx *context.APIContext) {
224224
// swagger:operation GET /repos/{owner}/{repo}/issues/{index}/reactions issue issueGetIssueReactions
225225
// ---
226-
// summary: Get a list reactions of a issue
226+
// summary: Get a list reactions of an issue
227227
// consumes:
228228
// - application/json
229229
// produces:
@@ -289,11 +289,11 @@ func GetIssueReactions(ctx *context.APIContext) {
289289
ctx.JSON(http.StatusOK, result)
290290
}
291291

292-
// PostIssueReaction add a reaction to a comment of a issue
292+
// PostIssueReaction add a reaction to an issue
293293
func PostIssueReaction(ctx *context.APIContext, form api.EditReactionOption) {
294294
// swagger:operation POST /repos/{owner}/{repo}/issues/{index}/reactions issue issuePostIssueReaction
295295
// ---
296-
// summary: Add a reaction to a comment of a issue
296+
// summary: Add a reaction to an issue
297297
// consumes:
298298
// - application/json
299299
// produces:
@@ -330,11 +330,11 @@ func PostIssueReaction(ctx *context.APIContext, form api.EditReactionOption) {
330330
changeIssueReaction(ctx, form, true)
331331
}
332332

333-
// DeleteIssueReaction list reactions of a issue comment
333+
// DeleteIssueReaction remove a reaction from an issue
334334
func DeleteIssueReaction(ctx *context.APIContext, form api.EditReactionOption) {
335335
// swagger:operation DELETE /repos/{owner}/{repo}/issues/{index}/reactions issue issueDeleteIssueReaction
336336
// ---
337-
// summary: Remove a reaction from a comment of a issue
337+
// summary: Remove a reaction from an issue
338338
// consumes:
339339
// - application/json
340340
// produces:

templates/swagger/v1_json.tmpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3102,7 +3102,7 @@
31023102
"tags": [
31033103
"issue"
31043104
],
3105-
"summary": "Get a list reactions of a issue comment",
3105+
"summary": "Get a list of reactions from a comment of an issue",
31063106
"operationId": "issueGetCommentReactions",
31073107
"parameters": [
31083108
{
@@ -3147,7 +3147,7 @@
31473147
"tags": [
31483148
"issue"
31493149
],
3150-
"summary": "Add a reaction to a comment of a issue comment",
3150+
"summary": "Add a reaction to a comment of an issue",
31513151
"operationId": "issuePostCommentReaction",
31523152
"parameters": [
31533153
{
@@ -3202,7 +3202,7 @@
32023202
"tags": [
32033203
"issue"
32043204
],
3205-
"summary": "Remove a reaction from a comment of a issue comment",
3205+
"summary": "Remove a reaction from a comment of an issue",
32063206
"operationId": "issueDeleteCommentReaction",
32073207
"parameters": [
32083208
{
@@ -3871,7 +3871,7 @@
38713871
"tags": [
38723872
"issue"
38733873
],
3874-
"summary": "Get a list reactions of a issue",
3874+
"summary": "Get a list reactions of an issue",
38753875
"operationId": "issueGetIssueReactions",
38763876
"parameters": [
38773877
{
@@ -3916,7 +3916,7 @@
39163916
"tags": [
39173917
"issue"
39183918
],
3919-
"summary": "Add a reaction to a comment of a issue",
3919+
"summary": "Add a reaction to an issue",
39203920
"operationId": "issuePostIssueReaction",
39213921
"parameters": [
39223922
{
@@ -3971,7 +3971,7 @@
39713971
"tags": [
39723972
"issue"
39733973
],
3974-
"summary": "Remove a reaction from a comment of a issue",
3974+
"summary": "Remove a reaction from an issue",
39753975
"operationId": "issueDeleteIssueReaction",
39763976
"parameters": [
39773977
{

0 commit comments

Comments
 (0)