Skip to content

Commit 1ca9738

Browse files
committed
Merge branch 'main' into lunny/fix_tag_404
2 parents 5420a32 + 9043584 commit 1ca9738

File tree

138 files changed

+3741
-943
lines changed

Some content is hidden

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

138 files changed

+3741
-943
lines changed

.github/workflows/cron-lock.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,4 @@ jobs:
2020
- uses: dessant/lock-threads@v5
2121
with:
2222
issue-inactive-days: 10
23-
issue-comment: |
24-
Automatically locked because of our [CONTRIBUTING guidelines](https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md#issue-locking)
2523
pr-inactive-days: 7
26-
pr-comment: |
27-
Automatically locked because of our [CONTRIBUTING guidelines](https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md#issue-locking)

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ _test
1515

1616
# MS VSCode
1717
.vscode
18-
__debug_bin
18+
__debug_bin*
1919

2020
*.cgo1.go
2121
*.cgo2.c

custom/conf/app.example.ini

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,12 @@ LEVEL = Info
956956
;GO_GET_CLONE_URL_PROTOCOL = https
957957
;;
958958
;; Close issues as long as a commit on any branch marks it as fixed
959+
;DEFAULT_CLOSE_ISSUES_VIA_COMMITS_IN_ANY_BRANCH = false
960+
;;
961+
;; Allow users to push local repositories to Gitea and have them automatically created for a user or an org
962+
;ENABLE_PUSH_CREATE_USER = false
963+
;ENABLE_PUSH_CREATE_ORG = false
964+
;;
959965
;; Comma separated list of globally disabled repo units. Allowed values: repo.issues, repo.ext_issues, repo.pulls, repo.wiki, repo.ext_wiki, repo.projects, repo.packages, repo.actions.
960966
;DISABLED_REPO_UNITS =
961967
;;
@@ -1474,8 +1480,9 @@ LEVEL = Info
14741480
;;
14751481
;; Default configuration for email notifications for users (user configurable). Options: enabled, onmention, disabled
14761482
;DEFAULT_EMAIL_NOTIFICATIONS = enabled
1477-
;; Disabled features for users, could be "deletion", more features can be disabled in future
1483+
;; Disabled features for users, could be "deletion","manage_gpg_keys" more features can be disabled in future
14781484
;; - deletion: a user cannot delete their own account
1485+
;; - manage_gpg_keys: a user cannot configure gpg keys
14791486
;USER_DISABLED_FEATURES =
14801487

14811488
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

docs/content/administration/config-cheat-sheet.en-us.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,9 @@ And the following unique queues:
518518

519519
- `DEFAULT_EMAIL_NOTIFICATIONS`: **enabled**: Default configuration for email notifications for users (user configurable). Options: enabled, onmention, disabled
520520
- `DISABLE_REGULAR_ORG_CREATION`: **false**: Disallow regular (non-admin) users from creating organizations.
521-
- `USER_DISABLED_FEATURES`: **_empty_** Disabled features for users, could be `deletion` and more features can be added in future.
521+
- `USER_DISABLED_FEATURES`: **_empty_** Disabled features for users, could be `deletion`, `manage_gpg_keys` and more features can be added in future.
522522
- `deletion`: User cannot delete their own account.
523+
- `manage_gpg_keys`: User cannot configure gpg keys
523524

524525
## Security (`security`)
525526

docs/content/administration/config-cheat-sheet.zh-cn.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,8 +497,9 @@ Gitea 创建以下非唯一队列:
497497

498498
- `DEFAULT_EMAIL_NOTIFICATIONS`: **enabled**:用户电子邮件通知的默认配置(用户可配置)。选项:enabled、onmention、disabled
499499
- `DISABLE_REGULAR_ORG_CREATION`: **false**:禁止普通(非管理员)用户创建组织。
500-
- `USER_DISABLED_FEATURES`:**_empty_** 禁用的用户特性,当前允许为空或者 `deletion`, 未来可以增加更多设置。
500+
- `USER_DISABLED_FEATURES`:**_empty_** 禁用的用户特性,当前允许为空或者 `deletion``manage_gpg_keys` 未来可以增加更多设置。
501501
- `deletion`: 用户不能通过界面或者API删除他自己。
502+
- `manage_gpg_keys`: 用户不能配置 GPG 密钥
502503

503504
## 安全性 (`security`)
504505

docs/content/administration/mail-templates.en-us.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ Please check [Gitea's logs](administration/logging-config.md) for error messages
224224
{{if not (eq .Body "")}}
225225
<h3>Message content</h3>
226226
<hr>
227-
{{.Body | Str2html}}
227+
{{.Body | SanitizeHTML}}
228228
{{end}}
229229
</p>
230230
<hr>
@@ -260,19 +260,19 @@ The template system contains several functions that can be used to further proce
260260
the messages. Here's a list of some of them:
261261

262262
| Name | Parameters | Available | Usage |
263-
| ---------------- | ----------- | --------- | --------------------------------------------------------------------------- |
263+
| ---------------- | ----------- | --------- |-----------------------------------------------------------------------------|
264264
| `AppUrl` | - | Any | Gitea's URL |
265265
| `AppName` | - | Any | Set from `app.ini`, usually "Gitea" |
266266
| `AppDomain` | - | Any | Gitea's host name |
267267
| `EllipsisString` | string, int | Any | Truncates a string to the specified length; adds ellipsis as needed |
268-
| `Str2html` | string | Body only | Sanitizes text by removing any HTML tags from it. |
268+
| `SanitizeHTML` | string | Body only | Sanitizes text by removing any dangerous HTML tags from it. |
269269
| `SafeHTML` | string | Body only | Takes the input as HTML; can be used for `.ReviewComments.RenderedContent`. |
270270

271271
These are _functions_, not metadata, so they have to be used:
272272

273273
```html
274-
Like this: {{Str2html "Escape<my>text"}}
275-
Or this: {{"Escape<my>text" | Str2html}}
274+
Like this: {{SanitizeHTML "Escape<my>text"}}
275+
Or this: {{"Escape<my>text" | SanitizeHTML}}
276276
Or this: {{AppUrl}}
277277
But not like this: {{.AppUrl}}
278278
```

docs/content/administration/mail-templates.zh-cn.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ _主题_ 和 _邮件正文_ 由 [Golang的模板引擎](https://go.dev/pkg/text/
207207
{{if not (eq .Body "")}}
208208
<h3>消息内容:</h3>
209209
<hr>
210-
{{.Body | Str2html}}
210+
{{.Body | SanitizeHTML}}
211211
{{end}}
212212
</p>
213213
<hr>
@@ -242,20 +242,20 @@ _主题_ 和 _邮件正文_ 由 [Golang的模板引擎](https://go.dev/pkg/text/
242242

243243
模板系统包含一些函数,可用于进一步处理和格式化消息。以下是其中一些函数的列表:
244244

245-
| 函数名 | 参数 | 可用于 | 用法 |
246-
|------------------| ----------- | ------------ | --------------------------------------------------------------------------------- |
247-
| `AppUrl` | - | 任何地方 | Gitea 的 URL |
248-
| `AppName` | - | 任何地方 |`app.ini` 中设置,通常为 "Gitea" |
249-
| `AppDomain` | - | 任何地方 | Gitea 的主机名 |
250-
| `EllipsisString` | string, int | 任何地方 | 将字符串截断为指定长度;根据需要添加省略号 |
251-
| `Str2html` | string | 仅正文部分 | 通过删除其中的 HTML 标签对文本进行清理 |
252-
| `SafeHTML` | string | 仅正文部分 | 将输入作为 HTML 处理;可用于 `.ReviewComments.RenderedContent` 等字段 |
245+
| 函数名 | 参数 | 可用于 | 用法 |
246+
|------------------| ----------- | ------------ |---------------------------------------------------------|
247+
| `AppUrl` | - | 任何地方 | Gitea 的 URL |
248+
| `AppName` | - | 任何地方 |`app.ini` 中设置,通常为 "Gitea" |
249+
| `AppDomain` | - | 任何地方 | Gitea 的主机名 |
250+
| `EllipsisString` | string, int | 任何地方 | 将字符串截断为指定长度;根据需要添加省略号 |
251+
| `SanitizeHTML` | string | 仅正文部分 | 通过删除其中的危险 HTML 标签对文本进行清理 |
252+
| `SafeHTML` | string | 仅正文部分 | 将输入作为 HTML 处理;可用于 `.ReviewComments.RenderedContent` 等字段 |
253253

254254
这些都是 _函数_,而不是元数据,因此必须按以下方式使用:
255255

256256
```html
257-
像这样使用: {{Str2html "Escape<my>text"}}
258-
或者这样使用: {{"Escape<my>text" | Str2html}}
257+
像这样使用: {{SanitizeHTML "Escape<my>text"}}
258+
或者这样使用: {{"Escape<my>text" | SanitizeHTML}}
259259
或者这样使用: {{AppUrl}}
260260
但不要像这样使用: {{.AppUrl}}
261261
```

docs/content/help/faq.en-us.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,11 @@ Our translations are currently crowd-sourced on our [Crowdin project](https://cr
221221

222222
Whether you want to change a translation or add a new one, it will need to be there as all translations are overwritten in our CI via the Crowdin integration.
223223

224-
## Push Hook / Webhook aren't running
224+
## Push Hook / Webhook / Actions aren't running
225225

226-
If you can push but can't see push activities on the home dashboard, or the push doesn't trigger webhook, there are a few possibilities:
226+
If you can push but can't see push activities on the home dashboard, or the push doesn't trigger webhook and Actions workflows, it's likely that the git hooks are not working.
227+
228+
There are a few possibilities:
227229

228230
1. The git hooks are out of sync: run "Resynchronize pre-receive, update and post-receive hooks of all repositories" on the site admin panel
229231
2. The git repositories (and hooks) are stored on some filesystems (ex: mounted by NAS) which don't support script execution, make sure the filesystem supports `chmod a+x any-script`

docs/content/help/faq.zh-cn.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,11 @@ Gitea还提供了自己的SSH服务器,用于在SSHD不可用时使用。
225225

226226
无论您想要更改翻译还是添加新的翻译,都需要在Crowdin集成中进行,因为所有翻译都会被CI覆盖。
227227

228-
## 推送钩子/ Webhook未运行
228+
## 推送钩子/ Webhook / Actions 未运行
229229

230-
如果您可以推送但无法在主页仪表板上看到推送活动,或者推送不触发Webhook,有几种可能性:
230+
如果您可以推送但无法在主页仪表板上看到推送活动,或者推送不触发 Webhook 和 Actions,可能是 git 钩子不工作而导致的。
231+
232+
这可能是由于以下原因:
231233

232234
1. Git钩子不同步:在站点管理面板上运行“重新同步所有仓库的pre-receive、update和post-receive钩子”
233235
2. Git仓库(和钩子)存储在一些不支持脚本执行的文件系统上(例如由NAS挂载),请确保文件系统支持`chmod a+x any-script`

models/fixtures/action_run.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,22 @@
1717
updated: 1683636626
1818
need_approval: 0
1919
approved_by: 0
20+
-
21+
id: 792
22+
title: "update actions"
23+
repo_id: 4
24+
owner_id: 1
25+
workflow_id: "artifact.yaml"
26+
index: 188
27+
trigger_user_id: 1
28+
ref: "refs/heads/master"
29+
commit_sha: "c2d72f548424103f01ee1dc02889c1e2bff816b0"
30+
event: "push"
31+
is_fork_pull_request: 0
32+
status: 1
33+
started: 1683636528
34+
stopped: 1683636626
35+
created: 1683636108
36+
updated: 1683636626
37+
need_approval: 0
38+
approved_by: 0

0 commit comments

Comments
 (0)