-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into highlight-patch
- Loading branch information
Showing
72 changed files
with
577 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -414,6 +414,7 @@ steps: | |
settings: | ||
author_email: "[email protected]" | ||
author_name: GiteaBot | ||
branch: main | ||
commit: true | ||
commit_message: "[skip ci] Updated translations via Crowdin" | ||
remote: "[email protected]:go-gitea/gitea.git" | ||
|
@@ -461,6 +462,7 @@ steps: | |
settings: | ||
author_email: "[email protected]" | ||
author_name: GiteaBot | ||
branch: main | ||
commit: true | ||
commit_message: "[skip ci] Updated licenses and gitignores " | ||
remote: "[email protected]:go-gitea/gitea.git" | ||
|
@@ -528,7 +530,7 @@ steps: | |
image: plugins/s3:1 | ||
settings: | ||
acl: public-read | ||
bucket: releases | ||
bucket: gitea-artifacts | ||
endpoint: https://storage.gitea.io | ||
path_style: true | ||
source: "dist/release/*" | ||
|
@@ -549,7 +551,7 @@ steps: | |
image: plugins/s3:1 | ||
settings: | ||
acl: public-read | ||
bucket: releases | ||
bucket: gitea-artifacts | ||
endpoint: https://storage.gitea.io | ||
path_style: true | ||
source: "dist/release/*" | ||
|
@@ -624,7 +626,7 @@ steps: | |
image: plugins/s3:1 | ||
settings: | ||
acl: public-read | ||
bucket: releases | ||
bucket: gitea-artifacts | ||
endpoint: https://storage.gitea.io | ||
path_style: true | ||
source: "dist/release/*" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,6 +101,16 @@ NOTES: | |
1. **YOU MUST READ THE [CONTRIBUTORS GUIDE](CONTRIBUTING.md) BEFORE STARTING TO WORK ON A PULL REQUEST.** | ||
2. If you have found a vulnerability in the project, please write privately to **[email protected]**. Thanks! | ||
|
||
## Translating | ||
|
||
Translations are done through Crowdin. If you want to translate to a new language ask one of the managers in the Crowdin project to add a new language there. | ||
|
||
You can also just create an issue for adding a language or ask on discord on the #translation channel. If you need context or find some translation issues, you can leave a comment on the string or ask on Discord. For general translation questions there is a section in the docs. Currently a bit empty but we hope fo fill it as questions pop up. | ||
|
||
https://docs.gitea.io/en-us/translation-guidelines/ | ||
|
||
[![Crowdin](https://badges.crowdin.net/gitea/localized.svg)](https://crowdin.com/project/gitea) | ||
|
||
## Further information | ||
|
||
For more information and instructions about how to install Gitea, please look at our [documentation](https://docs.gitea.io/en-us/). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -903,6 +903,15 @@ PATH = | |
;; - approved: only sign when merging an approved pr to a protected branch | ||
;MERGES = pubkey, twofa, basesigned, commitssigned | ||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;[repository.mimetype_mapping] | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;; | ||
;; Custom MIME type mapping for downloadable files | ||
;.apk=application/vnd.android.package-archive | ||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;[project] | ||
|
@@ -912,7 +921,6 @@ PATH = | |
;PROJECT_BOARD_BASIC_KANBAN_TYPE = To Do, In Progress, Done | ||
;PROJECT_BOARD_BUG_TRIAGE_TYPE = Needs Triage, High Priority, Low Priority, Closed | ||
|
||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;[cors] | ||
|
@@ -1591,6 +1599,11 @@ PATH = | |
;ENABLED = false | ||
;; Setting this to true will run all enabled cron tasks when Gitea starts. | ||
;RUN_AT_START = false | ||
;; | ||
;; Note: ``SCHEDULE`` accept formats | ||
;; - Full crontab specs, e.g. "* * * * * ?" | ||
;; - Descriptors, e.g. "@midnight", "@every 1h30m" | ||
;; See more: https://pkg.go.dev/github.com/gogs/[email protected] | ||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;; Basic cron tasks - enabled by default | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,6 +143,15 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`. | |
|
||
- `LOCAL_COPY_PATH`: **tmp/local-repo**: Path for temporary local repository copies. Defaults to `tmp/local-repo` | ||
|
||
## Repository - MIME type mapping (`repository.mimetype_mapping`) | ||
|
||
Configuration for set the expected MIME type based on file extensions of downloadable files. Configuration presents in key-value pairs and file extensions starts with leading `.`. | ||
|
||
The following configuration set `Content-Type: application/vnd.android.package-archive` header when downloading files with `.apk` file extension. | ||
```ini | ||
.apk=application/vnd.android.package-archive | ||
``` | ||
|
||
## CORS (`cors`) | ||
|
||
- `ENABLED`: **false**: enable cors headers (disabled by default) | ||
|
@@ -704,6 +713,11 @@ NB: You must have `DISABLE_ROUTER_LOG` set to `false` for this option to take ef | |
- `RUN_AT_START`: **false**: Run cron tasks at application start-up. | ||
- `NO_SUCCESS_NOTICE`: **false**: Set to true to switch off success notices. | ||
|
||
- `SCHEDULE` accept formats | ||
- Full crontab specs, e.g. `* * * * * ?` | ||
- Descriptors, e.g. `@midnight`, `@every 1h30m` ... | ||
- See more: [cron decument](https://pkg.go.dev/github.com/gogs/[email protected]) | ||
|
||
### Basic cron tasks - enabled by default | ||
|
||
#### Cron - Cleanup old repository archives (`cron.archive_cleanup`) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -245,6 +245,11 @@ test01.xls: application/vnd.ms-excel; charset=binary | |
|
||
- `ENABLED`: 是否在后台运行定期任务。 | ||
- `RUN_AT_START`: 是否启动时自动运行。 | ||
- `SCHEDULE` 所接受的格式 | ||
- 完整 crontab 控制, 例如 `* * * * * ?` | ||
- 描述符, 例如 `@midnight`, `@every 1h30m` ... | ||
- 更多细节参见 [cron api文档](https://pkg.go.dev/github.com/gogs/[email protected]) | ||
|
||
|
||
### Cron - Update Mirrors (`cron.update_mirrors`) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,8 +40,10 @@ func TestHashEmail(t *testing.T) { | |
} | ||
|
||
func TestSizedAvatarLink(t *testing.T) { | ||
setting.AppSubURL = "/testsuburl" | ||
|
||
disableGravatar() | ||
assert.Equal(t, "/suburl/assets/img/avatar_default.png", | ||
assert.Equal(t, "/testsuburl/assets/img/avatar_default.png", | ||
SizedAvatarLink("[email protected]", 100)) | ||
|
||
enableGravatar(t) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,6 +103,9 @@ MkM/fdpyc2hY7Dl/+qFmN5MG5yGmMpQcX+RNNR222ibNC1D3wg== | |
=i9b7 | ||
-----END PGP PUBLIC KEY BLOCK-----` | ||
keys, err := checkArmoredGPGKeyString(testGPGArmor) | ||
if !assert.NotEmpty(t, keys) { | ||
return | ||
} | ||
ekey := keys[0] | ||
assert.NoError(t, err, "Could not parse a valid GPG armored key", ekey) | ||
|
||
|
@@ -189,6 +192,10 @@ Unknown GPG key with good email | |
} | ||
|
||
func TestCheckGPGUserEmail(t *testing.T) { | ||
assert.NoError(t, PrepareTestDatabase()) | ||
|
||
_ = AssertExistsAndLoadBean(t, &User{ID: 1}).(*User) | ||
|
||
testEmailWithUpperCaseLetters := `-----BEGIN PGP PUBLIC KEY BLOCK----- | ||
Version: GnuPG v1 | ||
|
@@ -222,9 +229,11 @@ Q0KHb+QcycSgbDx0ZAvdIacuKvBBcbxrsmFUI4LR+oIup0G9gUc0roPvr014jYQL | |
|
||
keys, err := AddGPGKey(1, testEmailWithUpperCaseLetters) | ||
assert.NoError(t, err) | ||
key := keys[0] | ||
if assert.Len(t, key.Emails, 1) { | ||
assert.Equal(t, "[email protected]", key.Emails[0].Email) | ||
if assert.NotEmpty(t, keys) { | ||
key := keys[0] | ||
if assert.Len(t, key.Emails, 1) { | ||
assert.Equal(t, "[email protected]", key.Emails[0].Email) | ||
} | ||
} | ||
} | ||
|
||
|
@@ -374,7 +383,9 @@ epiDVQ== | |
` | ||
keys, err := checkArmoredGPGKeyString(testIssue6599) | ||
assert.NoError(t, err) | ||
ekey := keys[0] | ||
expire := getExpiryTime(ekey) | ||
assert.Equal(t, time.Unix(1586105389, 0), expire) | ||
if assert.NotEmpty(t, keys) { | ||
ekey := keys[0] | ||
expire := getExpiryTime(ekey) | ||
assert.Equal(t, time.Unix(1586105389, 0), expire) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.