Skip to content

Commit 2575481

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: (45 commits) Include resource state events in Gitlab downloads (go-gitea#29382) Add API to get PR by base/head (go-gitea#29242) [skip ci] Updated translations via Crowdin Improve Documentation for Restoration from backup (go-gitea#29321) Refactor "user/active" related logic (go-gitea#29390) Remove jQuery AJAX from the archive download links (go-gitea#29380) Add tailwindcss (go-gitea#29357) Add missing space (go-gitea#29393) Integrate alpine `noarch` packages into other architectures index (go-gitea#29137) enforce maxlength in frontend (go-gitea#29389) Remove incorrect and unnecessary Escape from templates (go-gitea#29394) Make actions animation rotate counterclockwisely (go-gitea#29378) Use `crypto/sha256` (go-gitea#29386) Add `io.Closer` guidelines (go-gitea#29387) Remove jQuery AJAX from the notice selection deletion button (go-gitea#29381) Refactor Safe modifier (go-gitea#29392) Add attachment support for code review comments (go-gitea#29220) Refactor modules/git global variables (go-gitea#29376) Remove jQuery from the code diff expansion buttons (go-gitea#29385) Remove jQuery AJAX from the markdown editor preview (go-gitea#29384) ...
2 parents 0009684 + 17f170e commit 2575481

File tree

283 files changed

+4179
-2571
lines changed

Some content is hidden

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

283 files changed

+4179
-2571
lines changed

.github/workflows/pull-db-tests.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,6 @@ jobs:
3737
MINIO_ROOT_PASSWORD: 12345678
3838
ports:
3939
- "9000:9000"
40-
simplesaml:
41-
image: allspice/simple-saml
42-
ports:
43-
- "8080:8080"
44-
env:
45-
SIMPLESAMLPHP_SP_ENTITY_ID: http://localhost:3002/user/saml/test-sp/metadata
46-
SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE: http://localhost:3002/user/saml/test-sp/acs
47-
SIMPLESAMLPHP_SP_SINGLE_LOGOUT_SERVICE: http://localhost:3002/user/saml/test-sp/acs
4840
steps:
4941
- uses: actions/checkout@v4
5042
- uses: actions/setup-go@v5

.stylelintrc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ rules:
9898
at-rule-allowed-list: null
9999
at-rule-disallowed-list: null
100100
at-rule-empty-line-before: null
101-
at-rule-no-unknown: true
101+
at-rule-no-unknown: [true, {ignoreAtRules: [tailwind]}]
102102
at-rule-no-vendor-prefix: true
103103
at-rule-property-required-list: null
104104
block-no-empty: true

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,4 @@ Rui Chen <[email protected]> (@chenrui333)
5959
Nanguan Lin <[email protected]> (@lng2020)
6060
kerwin612 <[email protected]> (@kerwin612)
6161
Gary Wang <[email protected]> (@BLumia)
62+
Tim-Niclas Oelschläger <[email protected]> (@zokkis)

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ GO_TEST_PACKAGES ?= $(filter-out $(shell $(GO) list code.gitea.io/gitea/models/m
119119
FOMANTIC_WORK_DIR := web_src/fomantic
120120

121121
WEBPACK_SOURCES := $(shell find web_src/js web_src/css -type f)
122-
WEBPACK_CONFIGS := webpack.config.js
122+
WEBPACK_CONFIGS := webpack.config.js tailwind.config.js
123123
WEBPACK_DEST := public/assets/js/index.js public/assets/css/index.css
124124
WEBPACK_DEST_ENTRIES := public/assets/js public/assets/css public/assets/fonts public/assets/img/webpack
125125

assets/go-licenses.json

Lines changed: 0 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/generate-svg.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ import {optimize} from 'svgo';
44
import {parse} from 'node:path';
55
import {readFile, writeFile, mkdir} from 'node:fs/promises';
66
import {fileURLToPath} from 'node:url';
7+
import {exit} from 'node:process';
78

89
const glob = (pattern) => fastGlob.sync(pattern, {
910
cwd: fileURLToPath(new URL('..', import.meta.url)),
1011
absolute: true,
1112
});
1213

13-
function exit(err) {
14+
function doExit(err) {
1415
if (err) console.error(err);
15-
process.exit(err ? 1 : 0);
16+
exit(err ? 1 : 0);
1617
}
1718

1819
async function processFile(file, {prefix, fullName} = {}) {
@@ -64,7 +65,7 @@ async function main() {
6465
}
6566

6667
try {
67-
exit(await main());
68+
doExit(await main());
6869
} catch (err) {
69-
exit(err);
70+
doExit(err);
7071
}

docs/content/administration/backup-and-restore.en-us.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ cd gitea-dump-1610949662
9292
mv app.ini /etc/gitea/conf/app.ini
9393
mv data/* /var/lib/gitea/data/
9494
mv log/* /var/lib/gitea/log/
95-
mv repos/* /var/lib/gitea/gitea-repositories/
95+
mv repos/* /var/lib/gitea/data/gitea-repositories/
9696
chown -R gitea:gitea /etc/gitea/conf/app.ini /var/lib/gitea
9797

9898
# mysql
@@ -111,6 +111,8 @@ With Gitea running, and from the directory Gitea's binary is located, execute: `
111111

112112
This ensures that application and configuration file paths in repository Git Hooks are consistent and applicable to the current installation. If these paths are not updated, repository `push` actions will fail.
113113

114+
If you still have issues, consider running `./gitea doctor check` to inspect possible errors (or run with `--fix`).
115+
114116
### Using Docker (`restore`)
115117

116118
There is also no support for a recovery command in a Docker-based gitea instance. The restore process contains the same steps as described in the previous section but with different paths.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ the messages. Here's a list of some of them:
266266
| `AppDomain` | - | Any | Gitea's host name |
267267
| `EllipsisString` | string, int | Any | Truncates a string to the specified length; adds ellipsis as needed |
268268
| `Str2html` | string | Body only | Sanitizes text by removing any HTML tags from it. |
269-
| `Safe` | string | Body only | Takes the input as HTML; can be used for `.ReviewComments.RenderedContent`. |
269+
| `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

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,14 @@ _主题_ 和 _邮件正文_ 由 [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-
| `Safe` | string | 仅正文部分 | 将输入作为 HTML 处理;可用于 `.ReviewComments.RenderedContent` 等字段 |
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` 等字段 |
253253

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

docs/content/contributing/guidelines-backend.en-us.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ i.e. `services/user`, `models/repository`.
101101
Since there are some packages which use the same package name, it is possible that you find packages like `modules/user`, `models/user`, and `services/user`. When these packages are imported in one Go file, it's difficult to know which package we are using and if it's a variable name or an import name. So, we always recommend to use import aliases. To differ from package variables which are commonly in camelCase, just use **snake_case** for import aliases.
102102
i.e. `import user_service "code.gitea.io/gitea/services/user"`
103103

104+
### Implementing `io.Closer`
105+
106+
If a type implements `io.Closer`, calling `Close` multiple times must not fail or `panic` but return an error or `nil`.
107+
104108
### Important Gotchas
105109

106110
- Never write `x.Update(exemplar)` without an explicit `WHERE` clause:

0 commit comments

Comments
 (0)