Skip to content

Commit 9ba27a8

Browse files
Merge branch 'master' into fix-14088-set-schema-every-connection
2 parents c157747 + d44f192 commit 9ba27a8

File tree

182 files changed

+4096
-4623
lines changed

Some content is hidden

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

182 files changed

+4096
-4623
lines changed

.eslintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ rules:
346346
unicorn/catch-error-name: [0]
347347
unicorn/consistent-function-scoping: [2]
348348
unicorn/custom-error-definition: [0]
349+
unicorn/empty-brace-spaces: [2]
349350
unicorn/error-message: [0]
350351
unicorn/escape-case: [0]
351352
unicorn/expiring-todo-comments: [0]
@@ -361,6 +362,7 @@ rules:
361362
unicorn/no-for-loop: [0]
362363
unicorn/no-hex-escape: [0]
363364
unicorn/no-keyword-prefix: [0]
365+
unicorn/no-lonely-if: [2]
364366
unicorn/no-nested-ternary: [0]
365367
unicorn/no-new-buffer: [0]
366368
unicorn/no-null: [0]
@@ -377,6 +379,7 @@ rules:
377379
unicorn/prefer-add-event-listener: [2]
378380
unicorn/prefer-array-find: [2]
379381
unicorn/prefer-dataset: [2]
382+
unicorn/prefer-date-now: [2]
380383
unicorn/prefer-event-key: [2]
381384
unicorn/prefer-includes: [2]
382385
unicorn/prefer-math-trunc: [2]

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,42 @@ 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.13.1](https://github.com/go-gitea/gitea/releases/tag/v1.13.1) - 2020-12-29
8+
9+
* SECURITY
10+
* Hide private participation in Orgs (#13994) (#14031)
11+
* Fix escaping issue in diff (#14153) (#14154)
12+
* BUGFIXES
13+
* Fix bug of link query order on markdown render (#14156) (#14171)
14+
* Drop long repo topics during migration (#14152) (#14155)
15+
* Ensure that search term and page are not lost on adoption page-turn (#14133) (#14143)
16+
* Fix storage config implementation (#14091) (#14095)
17+
* Fix panic in BasicAuthDecode (#14046) (#14048)
18+
* Always wait for the cmd to finish (#14006) (#14039)
19+
* Don't use simpleMDE editor on mobile devices for 1.13 (#14029)
20+
* Fix incorrect review comment diffs (#14002) (#14011)
21+
* Trim the branch prefix from action.GetBranch (#13981) (#13986)
22+
* Ensure template renderer is available before storage handler (#13164) (#13982)
23+
* Whenever the password is updated ensure that the hash algorithm is too (#13966) (#13967)
24+
* Enforce setting HEAD in wiki to master (#13950) (#13961)
25+
* Fix feishu webhook caused by API changed (#13938)
26+
* Fix Quote Reply button on review diff (#13830) (#13898)
27+
* Fix Pull Merge when tag with same name as base branch exist (#13882) (#13896)
28+
* Fix mermaid chart size (#13865)
29+
* Fix branch/tag notifications in mirror sync (#13855) (#13862)
30+
* Fix crash in short link processor (#13839) (#13841)
31+
* Update font stack to bootstrap's latest (#13834) (#13837)
32+
* Make sure email recipients can see issue (#13820) (#13827)
33+
* Reply button is not removed when deleting a code review comment (#13824)
34+
* When reinitialising DBConfig reset the database use flags (#13796) (#13811)
35+
* ENHANCEMENTS
36+
* Add emoji in label to project boards (#13978) (#14021)
37+
* Send webhook when tag is removed via Web UI (#14015) (#14019)
38+
* Use Process Manager to create own Context (#13792) (#13793)
39+
* API
40+
* GetCombinedCommitStatusByRef always return json & swagger doc fixes (#14047)
41+
* Return original URL of Repositories (#13885) (#13886)
42+
743
## [1.13.0](https://github.com/go-gitea/gitea/releases/tag/v1.13.0) - 2020-12-01
844
* SECURITY
945
* Add Allow-/Block-List for Migrate & Mirrors (#13610) (#13776)

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,11 @@ and lead the development of Gitea.
293293
To honor the past owners, here's the history of the owners and the time
294294
they served:
295295

296+
* 2021-01-01 ~ 2021-12-31 - https://github.com/go-gitea/gitea/issues/13801
297+
* [Lunny Xiao](https://gitea.com/lunny) <[email protected]>
298+
* [Lauris Bukšis-Haberkorns](https://gitea.com/lafriks) <[email protected]>
299+
* [Matti Ranta](https://gitea.com/techknowlogick) <[email protected]>
300+
296301
* 2020-01-01 ~ 2020-12-31 - https://github.com/go-gitea/gitea/issues/9230
297302
* [Lunny Xiao](https://gitea.com/lunny) <[email protected]>
298303
* [Lauris Bukšis-Haberkorns](https://gitea.com/lafriks) <[email protected]>

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,8 @@ lint: lint-frontend lint-backend
317317

318318
.PHONY: lint-frontend
319319
lint-frontend: node_modules
320-
npx eslint --max-warnings=0 web_src/js build templates webpack.config.js
321-
npx stylelint --max-warnings=0 web_src/less
320+
npx eslint --color --max-warnings=0 web_src/js build templates webpack.config.js
321+
npx stylelint --color --max-warnings=0 web_src/less
322322

323323
.PHONY: lint-backend
324324
lint-backend: golangci-lint revive vet
@@ -330,7 +330,7 @@ watch:
330330
.PHONY: watch-frontend
331331
watch-frontend: node-check node_modules
332332
rm -rf $(WEBPACK_DEST_ENTRIES)
333-
NODE_ENV=development npx webpack --hide-modules --display-entrypoints=false --watch --progress
333+
NODE_ENV=development npx webpack --watch --progress
334334

335335
.PHONY: watch-backend
336336
watch-backend: go-check
@@ -584,7 +584,7 @@ release-linux: | $(DIST_DIRS)
584584
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
585585
GO111MODULE=off $(GO) get -u src.techknowlogick.com/xgo; \
586586
fi
587-
CGO_CFLAGS="$(CGO_CFLAGS)" GO111MODULE=off xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64,linux/mips64le,linux/mips,linux/mipsle' -out gitea-$(VERSION) .
587+
CGO_CFLAGS="$(CGO_CFLAGS)" GO111MODULE=off xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64' -out gitea-$(VERSION) .
588588
ifeq ($(CI),drone)
589589
cp /build/* $(DIST)/binaries
590590
endif
@@ -660,7 +660,7 @@ webpack: $(WEBPACK_DEST)
660660

661661
$(WEBPACK_DEST): $(WEBPACK_SOURCES) $(WEBPACK_CONFIGS) package-lock.json | node_modules
662662
rm -rf $(WEBPACK_DEST_ENTRIES)
663-
npx webpack --hide-modules --display-entrypoints=false
663+
npx webpack
664664
@touch $(WEBPACK_DEST)
665665

666666
.PHONY: svg

README.md

Lines changed: 50 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,52 @@
1-
[简体中文](README_ZH.md)
2-
3-
<h1> <img src="https://raw.githubusercontent.com/go-gitea/gitea/master/public/img/gitea-192.png" alt="logo" width="30" height="30"> Gitea - Git with a cup of tea</h1>
4-
5-
[![Build Status](https://drone.gitea.io/api/badges/go-gitea/gitea/status.svg?ref=refs/heads/master)](https://drone.gitea.io/go-gitea/gitea)
6-
[![Join the Discord chat at https://discord.gg/Gitea](https://img.shields.io/discord/322538954119184384.svg)](https://discord.gg/Gitea)
7-
[![](https://images.microbadger.com/badges/image/gitea/gitea.svg)](https://microbadger.com/images/gitea/gitea "Get your own image badge on microbadger.com")
8-
[![codecov](https://codecov.io/gh/go-gitea/gitea/branch/master/graph/badge.svg)](https://codecov.io/gh/go-gitea/gitea)
9-
[![Go Report Card](https://goreportcard.com/badge/code.gitea.io/gitea)](https://goreportcard.com/report/code.gitea.io/gitea)
10-
[![GoDoc](https://godoc.org/code.gitea.io/gitea?status.svg)](https://godoc.org/code.gitea.io/gitea)
11-
[![GitHub release](https://img.shields.io/github/release/go-gitea/gitea.svg)](https://github.com/go-gitea/gitea/releases/latest)
12-
[![Help Contribute to Open Source](https://www.codetriage.com/go-gitea/gitea/badges/users.svg)](https://www.codetriage.com/go-gitea/gitea)
13-
[![Become a backer/sponsor of gitea](https://opencollective.com/gitea/tiers/backers/badge.svg?label=backers&color=brightgreen)](https://opencollective.com/gitea)
14-
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
15-
[![Crowdin](https://badges.crowdin.net/gitea/localized.svg)](https://crowdin.com/project/gitea)
16-
[![TODOs](https://badgen.net/https/api.tickgit.com/badgen/github.com/go-gitea/gitea)](https://www.tickgit.com/browse?repo=github.com/go-gitea/gitea)
1+
<p align="center">
2+
<a href="https://gitea.io/">
3+
<img alt="Gitea" src="https://raw.githubusercontent.com/go-gitea/gitea/master/public/img/gitea.svg" width="220"/>
4+
</a>
5+
</p>
6+
<h1 align="center">Gitea - Git with a cup of tea</h1>
7+
8+
<p align="center">
9+
<a href="https://drone.gitea.io/go-gitea/gitea" title="Build Status">
10+
<img src="https://drone.gitea.io/api/badges/go-gitea/gitea/status.svg?ref=refs/heads/master">
11+
</a>
12+
<a href="https://discord.gg/Gitea" title="Join the Discord chat at https://discord.gg/Gitea">
13+
<img src="https://img.shields.io/discord/322538954119184384.svg">
14+
</a>
15+
<a href="https://microbadger.com/images/gitea/gitea" title="Get your own image badge on microbadger.com">
16+
<img src="https://images.microbadger.com/badges/image/gitea/gitea.svg">
17+
</a>
18+
<a href="https://codecov.io/gh/go-gitea/gitea" title="Codecov">
19+
<img src="https://codecov.io/gh/go-gitea/gitea/branch/master/graph/badge.svg">
20+
</a>
21+
<a href="https://godoc.org/code.gitea.io/gitea" title="Go Report Card">
22+
<img src="https://goreportcard.com/badge/code.gitea.io/gitea">
23+
</a>
24+
<a href="https://godoc.org/code.gitea.io/gitea" title="GoDoc">
25+
<img src="https://godoc.org/code.gitea.io/gitea?status.svg">
26+
</a>
27+
<a href="https://github.com/go-gitea/gitea/releases/latest" title="GitHub release">
28+
<img src="https://img.shields.io/github/release/go-gitea/gitea.svg">
29+
</a>
30+
<a href="https://www.codetriage.com/go-gitea/gitea" title="Help Contribute to Open Source">
31+
<img src="https://www.codetriage.com/go-gitea/gitea/badges/users.svg">
32+
</a>
33+
<a href="https://opencollective.com/gitea" title="Become a backer/sponsor of gitea">
34+
<img src="https://opencollective.com/gitea/tiers/backers/badge.svg?label=backers&color=brightgreen">
35+
</a>
36+
<a href="https://opensource.org/licenses/MIT" title="License: MIT">
37+
<img src="https://img.shields.io/badge/License-MIT-blue.svg">
38+
</a>
39+
<a href="https://crowdin.com/project/gitea" title="Crowdin">
40+
<img src="https://badges.crowdin.net/gitea/localized.svg">
41+
</a>
42+
<a href="https://www.tickgit.com/browse?repo=github.com/go-gitea/gitea" title="TODOs">
43+
<img src="https://badgen.net/https/api.tickgit.com/badgen/github.com/go-gitea/gitea">
44+
</a>
45+
</p>
46+
47+
<p align="center">
48+
<a href="README_ZH.md">View the chinese version of this document</a>
49+
</p>
1750

1851
## Purpose
1952

@@ -73,7 +106,7 @@ For more information and instructions about how to install Gitea, please look at
73106
If you have questions that are not covered by the documentation, you can get in contact with us on our [Discord server](https://discord.gg/Gitea) or create a post in the [discourse forum](https://discourse.gitea.io/).
74107

75108
We maintain a list of Gitea-related projects at [gitea/awesome-gitea](https://gitea.com/gitea/awesome-gitea).
76-
The hugo-based documentationt theme is hosted at [gitea/theme](https://gitea.com/gitea/theme).
109+
The hugo-based documentation theme is hosted at [gitea/theme](https://gitea.com/gitea/theme).
77110
The official Gitea CLI is developed at [gitea/tea](https://gitea.com/gitea/tea).
78111

79112
## Authors

README_ZH.md

Lines changed: 49 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,52 @@
1-
[English](README.md)
2-
3-
<h1> <img src="https://raw.githubusercontent.com/go-gitea/gitea/master/public/img/gitea-192.png" alt="logo" width="30" height="30"> Gitea - Git with a cup of tea</h1>
4-
5-
[![Build Status](https://drone.gitea.io/api/badges/go-gitea/gitea/status.svg)](https://drone.gitea.io/go-gitea/gitea)
6-
[![Join the Discord chat at https://discord.gg/Gitea](https://img.shields.io/discord/322538954119184384.svg)](https://discord.gg/Gitea)
7-
[![](https://images.microbadger.com/badges/image/gitea/gitea.svg)](https://microbadger.com/images/gitea/gitea "Get your own image badge on microbadger.com")
8-
[![codecov](https://codecov.io/gh/go-gitea/gitea/branch/master/graph/badge.svg)](https://codecov.io/gh/go-gitea/gitea)
9-
[![Go Report Card](https://goreportcard.com/badge/code.gitea.io/gitea)](https://goreportcard.com/report/code.gitea.io/gitea)
10-
[![GoDoc](https://godoc.org/code.gitea.io/gitea?status.svg)](https://godoc.org/code.gitea.io/gitea)
11-
[![GitHub release](https://img.shields.io/github/release/go-gitea/gitea.svg)](https://github.com/go-gitea/gitea/releases/latest)
12-
[![Help Contribute to Open Source](https://www.codetriage.com/go-gitea/gitea/badges/users.svg)](https://www.codetriage.com/go-gitea/gitea)
13-
[![Become a backer/sponsor of gitea](https://opencollective.com/gitea/tiers/backers/badge.svg?label=backers&color=brightgreen)](https://opencollective.com/gitea)
14-
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
15-
[![Crowdin](https://badges.crowdin.net/gitea/localized.svg)](https://crowdin.com/project/gitea)
1+
<p align="center">
2+
<a href="https://gitea.io/">
3+
<img alt="Gitea" src="https://raw.githubusercontent.com/go-gitea/gitea/master/public/img/gitea.svg" width="220"/>
4+
</a>
5+
</p>
6+
<h1 align="center">Gitea - Git with a cup of tea</h1>
7+
8+
<p align="center">
9+
<a href="https://drone.gitea.io/go-gitea/gitea" title="Build Status">
10+
<img src="https://drone.gitea.io/api/badges/go-gitea/gitea/status.svg?ref=refs/heads/master">
11+
</a>
12+
<a href="https://discord.gg/Gitea" title="Join the Discord chat at https://discord.gg/Gitea">
13+
<img src="https://img.shields.io/discord/322538954119184384.svg">
14+
</a>
15+
<a href="https://microbadger.com/images/gitea/gitea" title="Get your own image badge on microbadger.com">
16+
<img src="https://images.microbadger.com/badges/image/gitea/gitea.svg">
17+
</a>
18+
<a href="https://codecov.io/gh/go-gitea/gitea" title="Codecov">
19+
<img src="https://codecov.io/gh/go-gitea/gitea/branch/master/graph/badge.svg">
20+
</a>
21+
<a href="https://godoc.org/code.gitea.io/gitea" title="Go Report Card">
22+
<img src="https://goreportcard.com/badge/code.gitea.io/gitea">
23+
</a>
24+
<a href="https://godoc.org/code.gitea.io/gitea" title="GoDoc">
25+
<img src="https://godoc.org/code.gitea.io/gitea?status.svg">
26+
</a>
27+
<a href="https://github.com/go-gitea/gitea/releases/latest" title="GitHub release">
28+
<img src="https://img.shields.io/github/release/go-gitea/gitea.svg">
29+
</a>
30+
<a href="https://www.codetriage.com/go-gitea/gitea" title="Help Contribute to Open Source">
31+
<img src="https://www.codetriage.com/go-gitea/gitea/badges/users.svg">
32+
</a>
33+
<a href="https://opencollective.com/gitea" title="Become a backer/sponsor of gitea">
34+
<img src="https://opencollective.com/gitea/tiers/backers/badge.svg?label=backers&color=brightgreen">
35+
</a>
36+
<a href="https://opensource.org/licenses/MIT" title="License: MIT">
37+
<img src="https://img.shields.io/badge/License-MIT-blue.svg">
38+
</a>
39+
<a href="https://crowdin.com/project/gitea" title="Crowdin">
40+
<img src="https://badges.crowdin.net/gitea/localized.svg">
41+
</a>
42+
<a href="https://www.tickgit.com/browse?repo=github.com/go-gitea/gitea" title="TODOs">
43+
<img src="https://badgen.net/https/api.tickgit.com/badgen/github.com/go-gitea/gitea">
44+
</a>
45+
</p>
46+
47+
<p align="center">
48+
<a href="README.md">View the english version of this document</a>
49+
</p>
1650

1751
## 目标
1852

build/generate-images.js

Lines changed: 18 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
'use strict';
33

44
const imageminZopfli = require('imagemin-zopfli');
5+
const Svgo = require('svgo');
56
const {fabric} = require('fabric');
67
const {readFile, writeFile} = require('fs').promises;
78
const {resolve} = require('path');
8-
const Svgo = require('svgo');
99

1010
const logoFile = resolve(__dirname, '../assets/logo.svg');
1111

@@ -22,32 +22,20 @@ function loadSvg(svg) {
2222
});
2323
}
2424

25-
async function generateSvgFavicon(svg, outputFile) {
26-
const svgo = new Svgo({
27-
plugins: [
28-
{removeDimensions: true},
29-
{
30-
addAttributesToSVGElement: {
31-
attributes: [
32-
{'width': '32'},
33-
{'height': '32'},
34-
],
35-
},
36-
},
37-
],
38-
});
39-
40-
const {data} = await svgo.optimize(svg);
41-
await writeFile(outputFile, data);
42-
}
25+
async function generate(svg, outputFile, {size, bg}) {
26+
if (outputFile.endsWith('.svg')) {
27+
const svgo = new Svgo({
28+
plugins: [
29+
{removeDimensions: true},
30+
{addAttributesToSVGElement: {attributes: [{width: size}, {height: size}]}},
31+
],
32+
});
4333

44-
async function generateSvg(svg, outputFile) {
45-
const svgo = new Svgo();
46-
const {data} = await svgo.optimize(svg);
47-
await writeFile(outputFile, data);
48-
}
34+
const {data} = await svgo.optimize(svg);
35+
await writeFile(outputFile, data);
36+
return;
37+
}
4938

50-
async function generate(svg, outputFile, {size, bg}) {
5139
const {objects, options} = await loadSvg(svg);
5240
const canvas = new fabric.Canvas();
5341
canvas.setDimensions({width: size, height: size});
@@ -78,25 +66,16 @@ async function generate(svg, outputFile, {size, bg}) {
7866

7967
async function main() {
8068
const gitea = process.argv.slice(2).includes('gitea');
81-
8269
const svg = await readFile(logoFile, 'utf8');
70+
8371
await Promise.all([
84-
generateSvgFavicon(svg, resolve(__dirname, '../public/img/favicon.svg')),
85-
generateSvg(svg, resolve(__dirname, '../public/img/logo.svg')),
86-
generate(svg, resolve(__dirname, '../public/img/logo-lg.png'), {size: 880}),
87-
generate(svg, resolve(__dirname, '../public/img/logo-512.png'), {size: 512}),
88-
generate(svg, resolve(__dirname, '../public/img/logo-192.png'), {size: 192}),
89-
generate(svg, resolve(__dirname, '../public/img/logo-sm.png'), {size: 120}),
90-
generate(svg, resolve(__dirname, '../public/img/avatar_default.png'), {size: 200}),
72+
generate(svg, resolve(__dirname, '../public/img/logo.svg'), {size: 32}),
73+
generate(svg, resolve(__dirname, '../public/img/logo.png'), {size: 512}),
9174
generate(svg, resolve(__dirname, '../public/img/favicon.png'), {size: 180}),
75+
generate(svg, resolve(__dirname, '../public/img/avatar_default.png'), {size: 200}),
9276
generate(svg, resolve(__dirname, '../public/img/apple-touch-icon.png'), {size: 180, bg: true}),
77+
gitea && generate(svg, resolve(__dirname, '../public/img/gitea.svg'), {size: 32}),
9378
]);
94-
if (gitea) {
95-
await Promise.all([
96-
generateSvg(svg, resolve(__dirname, '../public/img/gitea.svg')),
97-
generate(svg, resolve(__dirname, '../public/img/gitea-192.png'), {size: 192}),
98-
]);
99-
}
10079
}
10180

10281
main().then(exit).catch(exit);

cmd/admin.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,11 @@ var (
282282
Value: "",
283283
Usage: "Use a custom Email URL (option for GitHub)",
284284
},
285+
cli.StringFlag{
286+
Name: "icon-url",
287+
Value: "",
288+
Usage: "Custom icon URL for OAuth2 login source",
289+
},
285290
}
286291

287292
microcmdAuthUpdateOauth = cli.Command{
@@ -606,6 +611,7 @@ func parseOAuth2Config(c *cli.Context) *models.OAuth2Config {
606611
ClientSecret: c.String("secret"),
607612
OpenIDConnectAutoDiscoveryURL: c.String("auto-discover-url"),
608613
CustomURLMapping: customURLMapping,
614+
IconURL: c.String("icon-url"),
609615
}
610616
}
611617

@@ -658,6 +664,10 @@ func runUpdateOauth(c *cli.Context) error {
658664
oAuth2Config.OpenIDConnectAutoDiscoveryURL = c.String("auto-discover-url")
659665
}
660666

667+
if c.IsSet("icon-url") {
668+
oAuth2Config.IconURL = c.String("icon-url")
669+
}
670+
661671
// update custom URL mapping
662672
var customURLMapping = &oauth2.CustomURLMapping{}
663673

0 commit comments

Comments
 (0)