Skip to content

Commit 51f4792

Browse files
authored
Merge branch 'main' into chunk-header-padding
2 parents b92351a + d04e581 commit 51f4792

File tree

280 files changed

+9631
-6249
lines changed

Some content is hidden

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

280 files changed

+9631
-6249
lines changed

Diff for: .drone.yml

-11
Original file line numberDiff line numberDiff line change
@@ -218,17 +218,6 @@ steps:
218218
GITHUB_READ_TOKEN:
219219
from_secret: github_read_token
220220

221-
- name: unit-test-race
222-
image: golang:1.17
223-
commands:
224-
- make test-backend
225-
environment:
226-
GOPROXY: off
227-
TAGS: sqlite sqlite_unlock_notify
228-
RACE_ENABLED: true
229-
GITHUB_READ_TOKEN:
230-
from_secret: github_read_token
231-
232221
- name: unit-test-gogit
233222
pull: always
234223
image: golang:1.17

Diff for: .gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
/templates/**/*.tmpl linguist-language=Handlebars
55
/.eslintrc linguist-language=YAML
66
/.stylelintrc linguist-language=YAML
7+
/web_src/fomantic/build/** linguist-generated
File renamed without changes.

Diff for: .github/ISSUE_TEMPLATE/bug-report.yaml

+89
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

Diff for: .github/ISSUE_TEMPLATE/config.yml

+17
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.

Diff for: .github/ISSUE_TEMPLATE/feature-request.yaml

+23
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

Diff for: .github/ISSUE_TEMPLATE/ui.bug-report.yaml

+62
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

Diff for: CHANGELOG.md

+44
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,41 @@ This changelog goes through all the changes that have been made in each release
44
without substantial changes to our git log; to see the highlights of what has
55
been added to each release, please refer to the [blog](https://blog.gitea.io).
66

7+
## [1.15.2](https://github.com/go-gitea/gitea/releases/tag/v1.15.2) - 2021-09-03
8+
9+
* BUGFIXES
10+
* Add unique constraint back into issue_index (#16938)
11+
* Close storage objects before cleaning (#16934) (#16942)
12+
13+
## [1.15.1](https://github.com/go-gitea/gitea/releases/tag/v1.15.1) - 2021-09-02
14+
15+
* BUGFIXES
16+
* Allow BASIC authentication access to /:owner/:repo/releases/download/* (#16916) (#16923)
17+
* Prevent leave changes dialogs due to autofill fields (#16912) (#16920)
18+
* Ignore review comment when ref commit is missed (#16905) (#16919)
19+
* Fix wrong attachment removal (#16915) (#16917)
20+
* Gitlab Migrator: dont ignore reactions of last request (#16903) (#16913)
21+
* Correctly return the number of Repositories for Organizations (#16807) (#16911)
22+
* Test if LFS object is accessible (#16865) (#16904)
23+
* Fix git.Blob.DataAsync(): close pipe since we return a NopCloser (#16899) (#16900)
24+
* Fix dump and restore respository (#16698) (#16898)
25+
* Repare and Improve GetDiffRangeWithWhitespaceBehavior (#16894) (#16895)
26+
* Fix wiki raw commit diff/patch view (#16891) (#16892)
27+
* Ensure wiki repos are all closed (#16886) (#16888)
28+
* List limited and private orgs if authenticated on API (#16866) (#16879)
29+
* Simplify split diff view generation and remove JS dependency (#16775) (#16863)
30+
* Ensure that the default visibility is set on the user create page (#16845) (#16862)
31+
* In Render tolerate not being passed a context (#16842) (#16858)
32+
* Upgrade xorm to v1.2.2 (#16663) & Add test to ensure that dumping of login sources remains correct (#16847) (#16848)
33+
* Report the correct number of pushes on the feeds (#16811) (#16822)
34+
* Add primary_key to issue_index (#16813) (#16820)
35+
* Prevent NPE on empty commit (#16812) (#16819)
36+
* Fix branch pagination error (#16805) (#16816)
37+
* Add missing return to handleSettingRemoteAddrError (#16794) (#16795)
38+
* Remove spurious / from issues.opened_by (#16793)
39+
* Ensure that template compilation panics are sent to the logs (#16788) (#16792)
40+
* Update caddyserver/certmagic (#16789) (#16790)
41+
742
## [1.15.0](https://github.com/go-gitea/gitea/releases/tag/v1.15.0) - 2021-08-21
843

944
* BREAKING
@@ -258,6 +293,15 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
258293
* Remove utf8 option from installation page (#16126)
259294
* Use Wants= over Requires= in systemd file (#15897)
260295

296+
## [1.14.7](https://github.com/go-gitea/gitea/releases/tag/v1.14.7) - 2021-09-02
297+
298+
* BUGFIXES
299+
* Add missing gitRepo close at GetDiffRangeWithWhitespaceBehavior (Partial #16894) (#16896)
300+
* Fix wiki raw commit diff/patch view (#16891) (#16893)
301+
* Ensure wiki repos are all closed (#16886) (#16889)
302+
* Upgrade xorm to v1.2.2 (#16663) & Add test to ensure that dumping of login sources remains correct (#16847) (#16849)
303+
* Recreate Tables should Recreate indexes on MySQL (#16718) (#16740)
304+
261305
## [1.14.6](https://github.com/go-gitea/gitea/releases/tag/v1.14.6) - 2021-08-04
262306

263307
* SECURITY

Diff for: Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,9 @@ test\#%:
385385

386386
.PHONY: coverage
387387
coverage:
388-
GO111MODULE=on $(GO) run -mod=vendor build/gocovmerge.go integration.coverage.out coverage.out > coverage.all
388+
grep '^\(mode: .*\)\|\(.*:[0-9]\+\.[0-9]\+,[0-9]\+\.[0-9]\+ [0-9]\+ [0-9]\+\)$$' coverage.out > coverage-bodged.out
389+
grep '^\(mode: .*\)\|\(.*:[0-9]\+\.[0-9]\+,[0-9]\+\.[0-9]\+ [0-9]\+ [0-9]\+\)$$' integration.coverage.out > integration.coverage-bodged.out
390+
GO111MODULE=on $(GO) run -mod=vendor build/gocovmerge.go integration.coverage-bodged.out coverage-bodged.out > coverage.all || (echo "gocovmerge failed"; echo "integration.coverage.out"; cat integration.coverage.out; echo "coverage.out"; cat coverage.out; exit 1)
389391

390392
.PHONY: unit-test-coverage
391393
unit-test-coverage:
@@ -701,6 +703,7 @@ fomantic:
701703
cp -rf $(FOMANTIC_WORK_DIR)/_site $(FOMANTIC_WORK_DIR)/node_modules/fomantic-ui/src/
702704
cp -f web_src/js/vendor/dropdown.js $(FOMANTIC_WORK_DIR)/node_modules/fomantic-ui/src/definitions/modules
703705
cd $(FOMANTIC_WORK_DIR) && npx gulp -f node_modules/fomantic-ui/gulpfile.js build
706+
rm -f $(FOMANTIC_WORK_DIR)/build/*.min.*
704707

705708
.PHONY: webpack
706709
webpack: $(WEBPACK_DEST)

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<a href="https://codecov.io/gh/go-gitea/gitea" title="Codecov">
1616
<img src="https://codecov.io/gh/go-gitea/gitea/branch/main/graph/badge.svg">
1717
</a>
18-
<a href="https://godoc.org/code.gitea.io/gitea" title="Go Report Card">
18+
<a href="https://goreportcard.com/report/code.gitea.io/gitea" title="Go Report Card">
1919
<img src="https://goreportcard.com/badge/code.gitea.io/gitea">
2020
</a>
2121
<a href="https://godoc.org/code.gitea.io/gitea" title="GoDoc">

Diff for: README_ZH.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<a href="https://codecov.io/gh/go-gitea/gitea" title="Codecov">
1616
<img src="https://codecov.io/gh/go-gitea/gitea/branch/main/graph/badge.svg">
1717
</a>
18-
<a href="https://godoc.org/code.gitea.io/gitea" title="Go Report Card">
18+
<a href="https://goreportcard.com/report/code.gitea.io/gitea" title="Go Report Card">
1919
<img src="https://goreportcard.com/badge/code.gitea.io/gitea">
2020
</a>
2121
<a href="https://godoc.org/code.gitea.io/gitea" title="GoDoc">

Diff for: build/generate-svg.js

+1
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
],

Diff for: cmd/admin.go

+5
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

Diff for: cmd/admin_auth_ldap.go

+8
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

Diff for: cmd/convert.go

+1
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 {

Diff for: cmd/doctor.go

-1
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)

Diff for: cmd/dump_repo.go

+1
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 (

Diff for: cmd/migrate.go

+1
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 {

0 commit comments

Comments
 (0)