Skip to content

Commit bee6706

Browse files
authored
Merge branch 'main' into dingtalk-link-in-browser
2 parents 8ad4264 + b74a0f9 commit bee6706

File tree

204 files changed

+3895
-2126
lines changed

Some content is hidden

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

204 files changed

+3895
-2126
lines changed
File renamed without changes.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Bug Report
2+
description: Found something you weren't expecting? Report it here!
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: |
7+
NOTE: If your issue is a security concern, please send an email to [email protected] instead of opening a public issue.
8+
- type: markdown
9+
attributes:
10+
value: |
11+
1. Please speak English, this is the language all maintainers can speak and write.
12+
2. Please ask questions or configuration/deploy problems on our Discord
13+
server (https://discord.gg/gitea) or forum (https://discourse.gitea.io).
14+
3. Please take a moment to check that your issue doesn't already exist.
15+
4. Make sure it's not mentioned in the FAQ (https://docs.gitea.io/en-us/faq)
16+
5. Please give all relevant information below for bug reports, because
17+
incomplete details will be handled as an invalid report.
18+
- type: input
19+
id: gitea-ver
20+
attributes:
21+
label: Gitea Version
22+
description: Gitea version (or commit reference) your instance is running
23+
validations:
24+
required: true
25+
- type: input
26+
id: git-ver
27+
attributes:
28+
label: Git Version
29+
description: The version of git running on the server's systemm
30+
- type: input
31+
id: os-ver
32+
attributes:
33+
label: Operating System
34+
description: The operating system you are using to run Gitea
35+
- type: textarea
36+
id: run-info
37+
attributes:
38+
label: How are you running Gitea?
39+
description: |
40+
Please include information on whether you built gitea yourself, used one of our downloads, are using https://try.gitea.io or are using some other package
41+
Please also tell us how you are running gitea, e.g. if it is being run from docker, a command-line, systemd etc.
42+
If you are using a package or systemd tell us what distribution you are using
43+
validations:
44+
required: true
45+
- type: dropdown
46+
id: database
47+
attributes:
48+
label: Database
49+
description: What database system are you running?
50+
options:
51+
- PostgreSQL
52+
- MySQL
53+
- MSSQL
54+
- SQLite
55+
- type: dropdown
56+
id: can-reproduce
57+
attributes:
58+
label: Can you reproduce the bug on the Gitea demo site?
59+
description: |
60+
If so, please provide a URL in the Description field
61+
URL of Gitea demo: https://try.gitea.io
62+
options:
63+
- "Yes"
64+
- "No"
65+
validations:
66+
required: true
67+
- type: markdown
68+
attributes:
69+
value: |
70+
It really is important to provide pertinent logs
71+
Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems
72+
In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini
73+
- type: input
74+
id: logs
75+
attributes:
76+
label: Log Gist
77+
description: Please provide a gist URL of your logs, with any sensitive information (e.g. API keys) removed/hidden
78+
- type: textarea
79+
id: description
80+
attributes:
81+
label: Description
82+
description: |
83+
Please provide a description of your issue here, with a URL if you were able to reproduce the issue (see above)
84+
If using a proxy or a CDN (e.g. CloudFlare) in front of gitea, please disable the proxy/CDN fully and connect to gitea directly to confirm the issue still persists without those services.
85+
- type: textarea
86+
id: screenshots
87+
attributes:
88+
label: Screenshots
89+
description: If this issue involves the Web Interface, please provide a screenshot or multiple screenshots

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Security Concern
4+
url: https://tinyurl.com/security-gitea
5+
about: For security concerns, please send a mail to [email protected] instead of opening a public issue.
6+
- name: Discord Server
7+
url: https://discord.gg/gitea
8+
about: Please ask questions and discuss configuration or deployment problems here.
9+
- name: Discourse Forum
10+
url: https://discourse.gitea.io
11+
about: Questions and configuration or deployment problems can also be discussed on our forum.
12+
- name: Frequently Asked Questions
13+
url: https://docs.gitea.io/en-us/faq
14+
about: Please check if your question isn't mentioned here.
15+
- name: Crowdin Translations
16+
url: https://crowdin.com/project/gitea
17+
about: Translations are managed here.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Feature Request
2+
description: Got an idea for a feature that Gitea doesn't have currently? Submit your idea here!
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: |
7+
1. Please speak English, this is the language all maintainers can speak and write.
8+
2. Please ask questions or configuration/deploy problems on our Discord
9+
server (https://discord.gg/gitea) or forum (https://discourse.gitea.io).
10+
3. Please take a moment to check that your feature hasn't already been suggested.
11+
- type: textarea
12+
id: description
13+
attributes:
14+
label: Feature Description
15+
placeholder: |
16+
I think it would be great if Gitea had...
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: screenshots
21+
attributes:
22+
label: Screenshots
23+
description: If you can, provide screenshots of an implementation on another site e.g. GitHub
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Web Interface Bug Report
2+
description: Something doesn't look quite as it should? Report it here!
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: |
7+
NOTE: If your issue is a security concern, please send an email to [email protected] instead of opening a public issue.
8+
- type: markdown
9+
attributes:
10+
value: |
11+
1. Please speak English, this is the language all maintainers can speak and write.
12+
2. Please ask questions or configuration/deploy problems on our Discord
13+
server (https://discord.gg/gitea) or forum (https://discourse.gitea.io).
14+
3. Please take a moment to check that your issue doesn't already exist.
15+
4. Make sure it's not mentioned in the FAQ (https://docs.gitea.io/en-us/faq)
16+
5. Please give all relevant information below for bug reports, because
17+
incomplete details will be handled as an invalid report.
18+
- type: input
19+
id: gitea-ver
20+
attributes:
21+
label: Gitea Version
22+
description: Gitea version (or commit reference) your instance is running
23+
validations:
24+
required: true
25+
- type: input
26+
id: os-ver
27+
attributes:
28+
label: Operating System
29+
description: The operating system you are using to access Gitea
30+
- type: input
31+
id: browser-ver
32+
attributes:
33+
label: Browser Version
34+
description: The browser and version that you are using to access Gitea
35+
validations:
36+
required: true
37+
- type: dropdown
38+
id: can-reproduce
39+
attributes:
40+
label: Can you reproduce the bug on the Gitea demo site?
41+
description: |
42+
If so, please provide a URL in the Description field
43+
URL of Gitea demo: https://try.gitea.io
44+
options:
45+
- "Yes"
46+
- "No"
47+
validations:
48+
required: true
49+
- type: textarea
50+
id: description
51+
attributes:
52+
label: Description
53+
description: |
54+
Please provide a description of your issue here, with a URL if you were able to reproduce the issue (see above)
55+
If using a proxy or a CDN (e.g. CloudFlare) in front of gitea, please disable the proxy/CDN fully and connect to gitea directly to confirm the issue still persists without those services.
56+
- type: textarea
57+
id: screenshots
58+
attributes:
59+
label: Screenshots
60+
description: Please provide at least 1 screenshot showing the issue.
61+
validations:
62+
required: true

build/generate-svg.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ async function processFile(file, {prefix, fullName} = {}) {
3030
{name: 'preset-default'},
3131
{name: 'removeXMLNS'},
3232
{name: 'removeDimensions'},
33+
{name: 'prefixIds', params: {prefix: () => name}},
3334
{name: 'addClassesToSVGElement', params: {classNames: ['svg', name]}},
3435
{name: 'addAttributesToSVGElement', params: {attributes: [{'width': '16'}, {'height': '16'}, {'aria-hidden': 'true'}]}},
3536
],

cmd/admin.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,10 @@ var (
288288
Value: "",
289289
Usage: "Custom icon URL for OAuth2 login source",
290290
},
291+
cli.BoolFlag{
292+
Name: "skip-local-2fa",
293+
Usage: "Set to true to skip local 2fa for users authenticated by this source",
294+
},
291295
}
292296

293297
microcmdAuthUpdateOauth = cli.Command{
@@ -616,6 +620,7 @@ func parseOAuth2Config(c *cli.Context) *oauth2.Source {
616620
OpenIDConnectAutoDiscoveryURL: c.String("auto-discover-url"),
617621
CustomURLMapping: customURLMapping,
618622
IconURL: c.String("icon-url"),
623+
SkipLocalTwoFA: c.Bool("skip-local-2fa"),
619624
}
620625
}
621626

cmd/admin_auth_ldap.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ var (
8989
Name: "public-ssh-key-attribute",
9090
Usage: "The attribute of the user’s LDAP record containing the user’s public ssh key.",
9191
},
92+
cli.BoolFlag{
93+
Name: "skip-local-2fa",
94+
Usage: "Set to true to skip local 2fa for users authenticated by this source",
95+
},
9296
}
9397

9498
ldapBindDnCLIFlags = append(commonLdapCLIFlags,
@@ -245,6 +249,10 @@ func parseLdapConfig(c *cli.Context, config *ldap.Source) error {
245249
if c.IsSet("allow-deactivate-all") {
246250
config.AllowDeactivateAll = c.Bool("allow-deactivate-all")
247251
}
252+
if c.IsSet("skip-local-2fa") {
253+
config.SkipLocalTwoFA = c.Bool("skip-local-2fa")
254+
}
255+
248256
return nil
249257
}
250258

cmd/convert.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ func runConvert(ctx *cli.Context) error {
3131
log.Info("AppWorkPath: %s", setting.AppWorkPath)
3232
log.Info("Custom path: %s", setting.CustomPath)
3333
log.Info("Log path: %s", setting.LogRootPath)
34+
log.Info("Configuration file: %s", setting.CustomConf)
3435
setting.InitDBConfig()
3536

3637
if !setting.Database.UseMySQL {

cmd/doctor.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ func runRecreateTable(ctx *cli.Context) error {
124124
}
125125

126126
func runDoctor(ctx *cli.Context) error {
127-
128127
// Silence the default loggers
129128
log.DelNamedLogger("console")
130129
log.DelNamedLogger(log.DEFAULT)

cmd/dump_repo.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ func runDumpRepository(ctx *cli.Context) error {
8484
log.Info("AppWorkPath: %s", setting.AppWorkPath)
8585
log.Info("Custom path: %s", setting.CustomPath)
8686
log.Info("Log path: %s", setting.LogRootPath)
87+
log.Info("Configuration file: %s", setting.CustomConf)
8788
setting.InitDBConfig()
8889

8990
var (

cmd/migrate.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ func runMigrate(ctx *cli.Context) error {
3232
log.Info("AppWorkPath: %s", setting.AppWorkPath)
3333
log.Info("Custom path: %s", setting.CustomPath)
3434
log.Info("Log path: %s", setting.LogRootPath)
35+
log.Info("Configuration file: %s", setting.CustomConf)
3536
setting.InitDBConfig()
3637

3738
if err := models.NewEngine(context.Background(), migrations.Migrate); err != nil {

cmd/migrate_storage.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ func runMigrateStorage(ctx *cli.Context) error {
114114
log.Info("AppWorkPath: %s", setting.AppWorkPath)
115115
log.Info("Custom path: %s", setting.CustomPath)
116116
log.Info("Log path: %s", setting.LogRootPath)
117+
log.Info("Configuration file: %s", setting.CustomConf)
117118
setting.InitDBConfig()
118119

119120
if err := models.NewEngine(context.Background(), migrations.Migrate); err != nil {

custom/conf/app.example.ini

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -800,9 +800,6 @@ PATH =
800800
;; Prefix archive files by placing them in a directory named after the repository
801801
;PREFIX_ARCHIVE_FILES = true
802802
;;
803-
;; Disable the creation of new mirrors. Pre-existing mirrors remain valid.
804-
;DISABLE_MIRRORS = false
805-
;;
806803
;; Disable migrating feature.
807804
;DISABLE_MIGRATIONS = false
808805
;;
@@ -1945,6 +1942,12 @@ PATH =
19451942
;[mirror]
19461943
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
19471944
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1945+
;; Enables the mirror functionality. Set to **false** to disable all mirrors.
1946+
;ENABLED = true
1947+
;; Disable the creation of **new** pull mirrors. Pre-existing mirrors remain valid. Will be ignored if `mirror.ENABLED` is `false`.
1948+
;DISABLE_NEW_PULL = false
1949+
;; Disable the creation of **new** push mirrors. Pre-existing mirrors remain valid. Will be ignored if `mirror.ENABLED` is `false`.
1950+
;DISABLE_NEW_PUSH = false
19481951
;; Default interval as a duration between each check
19491952
;DEFAULT_INTERVAL = 8h
19501953
;; Min interval as a duration must be > 1m
@@ -1971,8 +1974,8 @@ PATH =
19711974
;[i18n]
19721975
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
19731976
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1974-
;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
1975-
;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,한국어
1977+
;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
1978+
;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,മലയാളം
19761979

19771980
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
19781981
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

docs/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ params:
1818
description: Git with a cup of tea
1919
author: The Gitea Authors
2020
website: https://docs.gitea.io
21-
version: 1.15.0
21+
version: 1.15.2
2222
minGoVersion: 1.16
2323
goVersion: 1.17
2424
minNodeVersion: 12.17

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
7373
- `DISABLED_REPO_UNITS`: **_empty_**: Comma separated list of globally disabled repo units. Allowed values: \[repo.issues, repo.ext_issues, repo.pulls, repo.wiki, repo.ext_wiki, repo.projects\]
7474
- `DEFAULT_REPO_UNITS`: **repo.code,repo.releases,repo.issues,repo.pulls,repo.wiki,repo.projects**: Comma separated list of default repo units. Allowed values: \[repo.code, repo.releases, repo.issues, repo.pulls, repo.wiki, repo.projects\]. Note: Code and Releases can currently not be deactivated. If you specify default repo units you should still list them for future compatibility. External wiki and issue tracker can't be enabled by default as it requires additional settings. Disabled repo units will not be added to new repositories regardless if it is in the default list.
7575
- `PREFIX_ARCHIVE_FILES`: **true**: Prefix archive files by placing them in a directory named after the repository.
76-
- `DISABLE_MIRRORS`: **false**: Disable the creation of **new** mirrors. Pre-existing mirrors remain valid.
7776
- `DISABLE_MIGRATIONS`: **false**: Disable migrating feature.
7877
- `DISABLE_STARS`: **false**: Disable stars feature.
7978
- `DEFAULT_BRANCH`: **master**: Default branch name of all repositories.
@@ -876,8 +875,8 @@ NB: You must have `DISABLE_ROUTER_LOG` set to `false` for this option to take ef
876875

877876
## i18n (`i18n`)
878877

879-
- `LANGS`: **en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,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**: List of locales shown in language selector
880-
- `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,한국어**: Visible names corresponding to the locales
878+
- `LANGS`: **en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,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**: List of locales shown in language selector
879+
- `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
881880

882881
## U2F (`U2F`)
883882
- `APP_ID`: **`ROOT_URL`**: Declares the facet of the application. Requires HTTPS.
@@ -955,6 +954,9 @@ Task queue configuration has been moved to `queue.task`. However, the below conf
955954

956955
## Mirror (`mirror`)
957956

957+
- `ENABLED`: **true**: Enables the mirror functionality. Set to **false** to disable all mirrors.
958+
- `DISABLE_NEW_PULL`: **false**: Disable the creation of **new** pull mirrors. Pre-existing mirrors remain valid. Will be ignored if `mirror.ENABLED` is `false`.
959+
- `DISABLE_NEW_PUSH`: **false**: Disable the creation of **new** push mirrors. Pre-existing mirrors remain valid. Will be ignored if `mirror.ENABLED` is `false`.
958960
- `DEFAULT_INTERVAL`: **8h**: Default interval between each check
959961
- `MIN_INTERVAL`: **10m**: Minimum interval for checking. (Must be >1m).
960962

docs/content/doc/installation/database-preparation.en-us.md

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

1616
# Database Preparation
1717

18-
You need a database to use Gitea. Gitea supports PostgreSQL, MySQL, SQLite, and MSSQL. This page will guide into preparing database. Only PostgreSQL and MySQL will be covered here since those database engines are widely-used in production.
18+
You need a database to use Gitea. Gitea supports PostgreSQL (>=10), MySQL (>=5.7), SQLite, and MSSQL (>=2008R2 SP3). This page will guide into preparing database. Only PostgreSQL and MySQL will be covered here since those database engines are widely-used in production.
1919

2020
Database instance can be on same machine as Gitea (local database setup), or on different machine (remote database).
2121

0 commit comments

Comments
 (0)