Skip to content

Commit 7c44a3a

Browse files
authored
Merge branch 'main' into enable-spellcheck-easymde
2 parents 7b34b4f + cdd6371 commit 7c44a3a

File tree

356 files changed

+4540
-3997
lines changed

Some content is hidden

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

356 files changed

+4540
-3997
lines changed
File renamed without changes.

.gitattributes

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
* text=auto eol=lf
22
*.tmpl linguist-language=Handlebars
3-
/.eslintrc linguist-language=YAML
4-
/.stylelintrc linguist-language=YAML
53
/public/vendor/** -text -eol linguist-vendored
64
/vendor/** -text -eol linguist-vendored
75
/web_src/fomantic/build/** linguist-generated
File renamed without changes.

SECURITY.md

+69-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,76 @@
33
The Gitea maintainers take security seriously.
44
If you discover a security issue, please bring it to their attention right away!
55

6-
### Reporting a Vulnerability
6+
## Reporting a Vulnerability
77

88
Please **DO NOT** file a public issue, instead send your report privately to `[email protected]`.
99

10+
## Protecting Security Information
11+
12+
Due to the sensitive nature of security information, you can use below GPG public key encrypt your mail body.
13+
14+
The PGP key is valid until June 24, 2024.
15+
Key ID: 6FCD2D5B
16+
Key Type: RSA
17+
Expires: 6/24/2024
18+
Key Size: 4096/4096
19+
Fingerprint: 3DE0 3D1E 144A 7F06 9359 99DC AAFD 2381 6FCD 2D5B
20+
UserID: Gitea Security <[email protected]>
21+
22+
```
23+
-----BEGIN PGP PUBLIC KEY BLOCK-----
24+
25+
mQINBGK1Z/4BEADFMqXA9DeeChmSxUjF0Be5sq99ZUhgrZjcN/wOzz0wuCJZC0l8
26+
4uC+d6mfv7JpJYlzYzOK97/x5UguKHkYNZ6mm1G9KHaXmoIBDLKDzfPdJopVNv2r
27+
OajijaE0uMCnMjadlg5pbhMLRQG8a9J32yyaz7ZEAw72Ab31fvvcA53NkuqO4j2w
28+
k7dtFQzhbNOYV0VffQT90WDZdalYHB1JHyEQ+70U9OjVD5ggNYSzX98Eu3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J3LABEBAAGJAjwEGAEIACYWIQQ94D0eFEp/BpNZmdyq/SOBb80tWwUC
61+
YrVn/gIbDAUJA8JnAAAKCRCq/SOBb80tWyTBD/9AGpW6QoDF7zYjHAozH9S5RGCA
62+
Y7E82dG/0xmFUwPprAG0BKmmgU6TiipyVGmKIXGYYYU92pMnbvXkYQMoa+WJNncN
63+
D3fY52UeXeffTf4cFpStlzi9xgYtOLhFamzYu/4xhkjOX+xhOSXscCiFRyT8cF3B
64+
O6c5BHU+Zj0/rGPgOyPUbx7l7B9MubB/41nNX35k08e+8T3wtWDb4XF+15HnRfva
65+
6fblO8wgU25Orv2Rm1jnKGa9DxJ8nE40IMrqDapENtDuL+zKJsvR0+ptWvEyL56U
66+
GtJJG5un6mXiLKuRQT0DEv4MdZRHDgDstDnqcbEiazVEbUuvhZZob6lRY2A19m1+
67+
7zfnDxkhqCA1RCnv4fdvcPdCMMFHwLpdhjgW0aI/uwgwrvsEz5+JRlnLvdQHlPAg
68+
q7l2fGcBSpz9U0ayyfRPjPntsNCtZl1UDxGLeciPkZhyG84zEWQbk/j52ZpRN+Ik
69+
ALpRLa8RBFmFSmXDUmwQrmm1EmARyQXwweKU31hf8ZGbCp2lPuRYm1LuGiirXSVP
70+
GysjRAJgW+VRpBKOzFQoUAUbReVWSaCwT8s17THzf71DdDb6CTj31jMLLYWwBpA/
71+
i73DgobDZMIGEZZC1EKqza8eh11xfyHFzGec03tbh+lIen+5IiRtWiEWkDS9ll0G
72+
zgS/ZdziCvdAutqnGA==
73+
=gZWO
74+
-----END PGP PUBLIC KEY BLOCK-----
75+
76+
```
77+
1078
Security reports are greatly appreciated and we will publicly thank you for it, although we keep your name confidential if you request it.

cmd/manager_logging.go

+27
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,18 @@ var (
174174
Action: runAddSMTPLogger,
175175
},
176176
},
177+
}, {
178+
Name: "log-sql",
179+
Usage: "Set LogSQL",
180+
Flags: []cli.Flag{
181+
cli.BoolFlag{
182+
Name: "debug",
183+
}, cli.BoolFlag{
184+
Name: "off",
185+
Usage: "Switch off SQL logging",
186+
},
187+
},
188+
Action: runSetLogSQL,
177189
},
178190
},
179191
}
@@ -381,3 +393,18 @@ func runReleaseReopenLogging(c *cli.Context) error {
381393
fmt.Fprintln(os.Stdout, msg)
382394
return nil
383395
}
396+
397+
func runSetLogSQL(c *cli.Context) error {
398+
ctx, cancel := installSignals()
399+
defer cancel()
400+
setup("manager", c.Bool("debug"))
401+
402+
statusCode, msg := private.SetLogSQL(ctx, !c.Bool("off"))
403+
switch statusCode {
404+
case http.StatusInternalServerError:
405+
return fail("InternalServerError", msg)
406+
}
407+
408+
fmt.Fprintln(os.Stdout, msg)
409+
return nil
410+
}

custom/conf/app.example.ini

+4-15
Original file line numberDiff line numberDiff line change
@@ -475,20 +475,6 @@ ENABLE = true
475475
;; Maximum length of oauth2 token/cookie stored on server
476476
;MAX_TOKEN_LENGTH = 32767
477477

478-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
479-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
480-
[U2F]
481-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
482-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
483-
;;
484-
;; NOTE: THE DEFAULT VALUES HERE WILL NEED TO BE CHANGED
485-
;; Two Factor authentication with security keys
486-
;; https://developers.yubico.com/U2F/App_ID.html
487-
;;
488-
;; DEPRECATED - this only applies to previously registered security keys using the U2F standard
489-
APP_ID = ; e.g. http://localhost:3000/
490-
491-
492478
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
493479
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
494480
[log]
@@ -1097,6 +1083,9 @@ PATH =
10971083
;; Number of items that are displayed in home feed
10981084
;FEED_PAGING_NUM = 20
10991085
;;
1086+
;; Number of items that are displayed in a single subsitemap
1087+
;SITEMAP_PAGING_NUM = 20
1088+
;;
11001089
;; Number of maximum commits displayed in commit graph.
11011090
;GRAPH_MAX_COMMIT_NUM = 100
11021091
;;
@@ -2124,7 +2113,7 @@ PATH =
21242113
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
21252114
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
21262115
;; The first locale will be used as the default if user browser's language doesn't match any locale in the list.
2127-
;LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID,ml-IN
2116+
;LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID,ml-IN
21282117
;NAMES = English,简体中文,繁體中文(香港),繁體中文(台灣),Deutsch,Français,Nederlands,Latviešu,Русский,Українська,日本語,Español,Português do Brasil,Português de Portugal,Polski,Български,Italiano,Suomi,Türkçe,Čeština,Српски,Svenska,한국어,Ελληνικά,فارسی,Magyar nyelv,Bahasa Indonesia,മലയാളം
21292118

21302119
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
174174
- `MEMBERS_PAGING_NUM`: **20**: Number of members that are shown in organization members.
175175
- `FEED_MAX_COMMIT_NUM`: **5**: Number of maximum commits shown in one activity feed.
176176
- `FEED_PAGING_NUM`: **20**: Number of items that are displayed in home feed.
177+
- `SITEMAP_PAGING_NUM`: **20**: Number of items that are displayed in a single subsitemap.
177178
- `GRAPH_MAX_COMMIT_NUM`: **100**: Number of maximum commits shown in the commit graph.
178179
- `CODE_COMMENT_LINES`: **4**: Number of line of codes shown for a code comment.
179180
- `DEFAULT_THEME`: **auto**: \[auto, gitea, arc-green\]: Set the default theme for the Gitea install.
@@ -998,13 +999,10 @@ Default templates for project boards:
998999

9991000
## i18n (`i18n`)
10001001

1001-
- `LANGS`: **en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID,ml-IN**:
1002+
- `LANGS`: **en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID,ml-IN**:
10021003
List of locales shown in language selector. The first locale will be used as the default if user browser's language doesn't match any locale in the list.
10031004
- `NAMES`: **English,简体中文,繁體中文(香港),繁體中文(台灣),Deutsch,Français,Nederlands,Latviešu,Русский,Українська,日本語,Español,Português do Brasil,Português de Portugal,Polski,Български,Italiano,Suomi,Türkçe,Čeština,Српски,Svenska,한국어,Ελληνικά,فارسی,Magyar nyelv,Bahasa Indonesia,മലയാളം**: Visible names corresponding to the locales
10041005

1005-
## U2F (`U2F`) **DEPRECATED**
1006-
- `APP_ID`: **`ROOT_URL`**: Declares the facet of the application which is used for authentication of previously registered U2F keys. Requires HTTPS.
1007-
10081006
## Markup (`markup`)
10091007

10101008
- `MERMAID_MAX_SOURCE_CHARACTERS`: **5000**: Set the maximum size of a Mermaid source. (Set to -1 to disable)

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,8 @@ The list of themes a user can choose from can be configured with the `THEMES` va
335335

336336
To make a custom theme available to all users:
337337

338-
1. Add a CSS file to `$GITEA_PUBLIC/public/css/theme-<theme-name>.css`.
339-
The value of `$GITEA_PUBLIC` of your instance can be queried by calling `gitea help` and looking up the value of "CustomPath".
338+
1. Add a CSS file to `$GITEA_CUSTOM/public/css/theme-<theme-name>.css`.
339+
The value of `$GITEA_CUSTOM` of your instance can be queried by calling `gitea help` and looking up the value of "CustomPath".
340340
2. Add `<theme-name>` to the comma-separated list of setting `THEMES` in `app.ini`
341341

342342
Community themes are listed in [gitea/awesome-gitea#themes](https://gitea.com/gitea/awesome-gitea#themes).

docs/content/doc/developers/oauth2-provider.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ To use the Authorization Code Grant as a third party application it is required
4141

4242
## Scopes
4343

44-
Currently Gitea does not support scopes (see [#4300](https://github.com/go-gitea/gitea/issues/4300)) and all third party applications will be granted access to all resources of the user and his/her organizations.
44+
Currently Gitea does not support scopes (see [#4300](https://github.com/go-gitea/gitea/issues/4300)) and all third party applications will be granted access to all resources of the user and their organizations.
4545

4646
## Example
4747

4848
**Note:** This example does not use PKCE.
4949

50-
1. Redirect to user to the authorization endpoint in order to get his/her consent for accessing the resources:
50+
1. Redirect to user to the authorization endpoint in order to get their consent for accessing the resources:
5151

5252
```curl
5353
https://[YOUR-GITEA-URL]/login/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI& response_type=code&state=STATE

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Gitea 支援作為 OAuth2 提供者,能讓第三方程式能在使用者同意
4646
**備註:** 此範例未使用 PKCE。
4747

4848
1. 重新導向使用者到 authorization endpoint 以獲得他同意授權存取資源:
49-
<!-- 1. Redirect to user to the authorization endpoint in order to get his/her consent for accessing the resources: -->
49+
<!-- 1. Redirect to user to the authorization endpoint in order to get their consent for accessing the resources: -->
5050

5151
```curl
5252
https://[YOUR-GITEA-URL]/login/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI& response_type=code&state=STATE

docs/content/doc/features/comparison.zh-tw.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ menu:
5050
| 有寫入權限的儲存庫 Token ||||||||
5151
| 內建 Container Registry | [](https://github.com/go-gitea/gitea/issues/2316) |||||||
5252
| 對外部 Git 鏡像 ||||||||
53-
| FIDO U2F (2FA) ||||||||
53+
| FIDO (2FA) ||||||||
5454
| 內建 CI/CD ||||||||
5555
| 子群組: 群組中的群組 ||||||||
5656

docs/content/doc/help/seek-help.en-us.md

+20-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,26 @@ menu:
2020

2121
**NOTE:** When asking for support, it may be a good idea to have the following available so that the person helping has all the info they need:
2222

23-
1. Your `app.ini` (with any sensitive data scrubbed as necessary)
24-
2. The `gitea.log` (and any other appropriate log files for the situation)
25-
* e.g. If the error is related to the database, the `xorm.log` might be helpful
26-
3. Any error messages you are seeing
23+
1. Your `app.ini` (with any sensitive data scrubbed as necessary).
24+
2. The Gitea logs, and any other appropriate log files for the situation.
25+
* The logs are likely to be outputted to console. If you need to collect logs from files,
26+
you could copy the following config into your `app.ini` (remove all other `[log]` sections),
27+
then you can find the `*.log` files in Gitea's log directory (default: `%(GITEA_WORK_DIR)/log`).
28+
```ini
29+
; To show all SQL logs, you can also set LOG_SQL=true in the [database] section
30+
[log]
31+
LEVEL=debug
32+
MODE=console,file
33+
ROUTER=console,file
34+
XORM=console,file
35+
ENABLE_XORM_LOG=true
36+
FILE_NAME=gitea.log
37+
[log.file.router]
38+
FILE_NAME=router.log
39+
[log.file.xorm]
40+
FILE_NAME=xorm.log
41+
```
42+
3. Any error messages you are seeing.
2743
4. When possible, try to replicate the issue on [try.gitea.io](https://try.gitea.io) and include steps so that others can reproduce the issue.
2844
* This will greatly improve the chance that the root of the issue can be quickly discovered and resolved.
2945
5. If you meet slow/hanging/deadlock problems, please report the stack trace when the problem occurs:

integrations/auth_ldap_test.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"code.gitea.io/gitea/models/organization"
1717
"code.gitea.io/gitea/models/unittest"
1818
user_model "code.gitea.io/gitea/models/user"
19-
"code.gitea.io/gitea/modules/translation/i18n"
19+
"code.gitea.io/gitea/modules/translation"
2020
"code.gitea.io/gitea/services/auth"
2121

2222
"github.com/stretchr/testify/assert"
@@ -275,8 +275,7 @@ func TestLDAPUserSigninFailed(t *testing.T) {
275275
addAuthSourceLDAP(t, "")
276276

277277
u := otherLDAPUsers[0]
278-
279-
testLoginFailed(t, u.UserName, u.Password, i18n.Tr("en", "form.username_password_incorrect"))
278+
testLoginFailed(t, u.UserName, u.Password, translation.NewLocale("en-US").Tr("form.username_password_incorrect"))
280279
}
281280

282281
func TestLDAPUserSSHKeySync(t *testing.T) {

integrations/branches_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"net/url"
1010
"testing"
1111

12-
"code.gitea.io/gitea/modules/translation/i18n"
12+
"code.gitea.io/gitea/modules/translation"
1313

1414
"github.com/stretchr/testify/assert"
1515
)
@@ -37,7 +37,7 @@ func TestUndoDeleteBranch(t *testing.T) {
3737
htmlDoc, name := branchAction(t, ".undo-button")
3838
assert.Contains(t,
3939
htmlDoc.doc.Find(".ui.positive.message").Text(),
40-
i18n.Tr("en", "repo.branch.restore_success", name),
40+
translation.NewLocale("en-US").Tr("repo.branch.restore_success", name),
4141
)
4242
})
4343
}
@@ -46,7 +46,7 @@ func deleteBranch(t *testing.T) {
4646
htmlDoc, name := branchAction(t, ".delete-branch-button")
4747
assert.Contains(t,
4848
htmlDoc.doc.Find(".ui.positive.message").Text(),
49-
i18n.Tr("en", "repo.branch.deletion_success", name),
49+
translation.NewLocale("en-US").Tr("repo.branch.deletion_success", name),
5050
)
5151
}
5252

integrations/mssql.ini.tmpl

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ PASSWD = {{TEST_MSSQL_PASSWORD}}
1010
SSL_MODE = disable
1111

1212
[indexer]
13-
ISSUE_INDEXER_PATH = integrations/gitea-integration-mssql/indexers/issues.bleve
14-
ISSUE_INDEXER_QUEUE_DIR = integrations/gitea-integration-mssql/indexers/issues.queue
1513
REPO_INDEXER_ENABLED = true
1614
REPO_INDEXER_PATH = integrations/gitea-integration-mssql/indexers/repos.bleve
1715

16+
[queue.issue_indexer]
17+
PATH = integrations/gitea-integration-mssql/indexers/issues.bleve
18+
DATADIR = integrations/gitea-integration-mssql/indexers/issues.queue
19+
1820
[queue]
1921
TYPE = immediate
2022

integrations/mysql.ini.tmpl

+5-3
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ PASSWD = {{TEST_MYSQL_PASSWORD}}
1010
SSL_MODE = disable
1111

1212
[indexer]
13-
ISSUE_INDEXER_TYPE = elasticsearch
14-
ISSUE_INDEXER_CONN_STR = http://elastic:changeme@elasticsearch:9200
15-
ISSUE_INDEXER_QUEUE_DIR = integrations/gitea-integration-mysql/indexers/issues.queue
1613
REPO_INDEXER_ENABLED = true
1714
REPO_INDEXER_PATH = integrations/gitea-integration-mysql/indexers/repos.bleve
1815

16+
[queue.issue_indexer]
17+
TYPE = elasticsearch
18+
CONN_STR = http://elastic:changeme@elasticsearch:9200
19+
DATADIR = integrations/gitea-integration-mysql/indexers/issues.queue
20+
1921
[queue]
2022
TYPE = immediate
2123

integrations/mysql8.ini.tmpl

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ PASSWD = {{TEST_MYSQL8_PASSWORD}}
1010
SSL_MODE = disable
1111

1212
[indexer]
13-
ISSUE_INDEXER_PATH = integrations/gitea-integration-mysql8/indexers/issues.bleve
14-
ISSUE_INDEXER_QUEUE_DIR = integrations/gitea-integration-mysql8/indexers/issues.queue
1513
REPO_INDEXER_ENABLED = true
1614
REPO_INDEXER_PATH = integrations/gitea-integration-mysql8/indexers/repos.bleve
1715

16+
[queue.issue_indexer]
17+
PATH = integrations/gitea-integration-mysql8/indexers/issues.bleve
18+
DATADIR = integrations/gitea-integration-mysql8/indexers/issues.queue
19+
1820
[queue]
1921
TYPE = immediate
2022

integrations/pgsql.ini.tmpl

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ SCHEMA = {{TEST_PGSQL_SCHEMA}}
1111
SSL_MODE = disable
1212

1313
[indexer]
14-
ISSUE_INDEXER_PATH = integrations/gitea-integration-pgsql/indexers/issues.bleve
15-
ISSUE_INDEXER_QUEUE_DIR = integrations/gitea-integration-pgsql/indexers/issues.queue
1614
REPO_INDEXER_ENABLED = true
1715
REPO_INDEXER_PATH = integrations/gitea-integration-pgsql/indexers/repos.bleve
1816

17+
[queue.issue_indexer]
18+
PATH = integrations/gitea-integration-pgsql/indexers/issues.bleve
19+
DATADIR = integrations/gitea-integration-pgsql/indexers/issues.queue
20+
1921
[queue]
2022
TYPE = immediate
2123

integrations/pull_merge_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"code.gitea.io/gitea/modules/git"
2828
api "code.gitea.io/gitea/modules/structs"
2929
"code.gitea.io/gitea/modules/test"
30-
"code.gitea.io/gitea/modules/translation/i18n"
30+
"code.gitea.io/gitea/modules/translation"
3131
"code.gitea.io/gitea/services/pull"
3232
repo_service "code.gitea.io/gitea/services/repository"
3333
files_service "code.gitea.io/gitea/services/repository/files"
@@ -204,7 +204,7 @@ func TestCantMergeWorkInProgress(t *testing.T) {
204204
text := strings.TrimSpace(htmlDoc.doc.Find(".merge-section > .item").Last().Text())
205205
assert.NotEmpty(t, text, "Can't find WIP text")
206206

207-
assert.Contains(t, text, i18n.Tr("en", "repo.pulls.cannot_merge_work_in_progress"), "Unable to find WIP text")
207+
assert.Contains(t, text, translation.NewLocale("en-US").Tr("repo.pulls.cannot_merge_work_in_progress"), "Unable to find WIP text")
208208
assert.Contains(t, text, "[wip]", "Unable to find WIP text")
209209
})
210210
}

0 commit comments

Comments
 (0)