Skip to content

Commit 983e604

Browse files
committed
Merge branch 'master' of https://github.com/go-gitea/gitea
2 parents 4635190 + a4e398d commit 983e604

File tree

294 files changed

+19973
-14127
lines changed

Some content is hidden

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

294 files changed

+19973
-14127
lines changed

.drone.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ steps:
6060
commands:
6161
- make css
6262
- make js
63+
- bash -c '[ -z "$(git status --porcelain public/js public/css)" ] || (echo "Generated js/css files do not match" && git status --porcelain public/js public/css && exit 1)'
6364

6465
- name: build-without-gcc
6566
pull: always

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ indent_size = 2
2424

2525
[*.js]
2626
indent_style = space
27-
indent_size = 4
27+
indent_size = 2
2828

2929
[Makefile]
3030
indent_style = tab

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/public/js/semantic.dropdown.custom.js
1+
/web_src/js/semanticDropdown.js

.eslintrc

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,53 @@
11
root: true
22

33
extends:
4+
- eslint-config-airbnb-base
45
- eslint:recommended
56

67
parserOptions:
7-
ecmaVersion: 2015
8+
ecmaVersion: 2020
89

910
env:
1011
browser: true
11-
jquery: true
1212
es6: true
13+
jquery: true
1314
node: true
1415

1516
globals:
17+
__webpack_public_path__: true
1618
Clipboard: false
1719
CodeMirror: false
20+
Dropzone: false
1821
emojify: false
22+
hljs: false
1923
SimpleMDE: false
20-
Vue: false
21-
Dropzone: false
2224
u2fApi: false
23-
hljs: false
25+
Vue: false
2426

2527
rules:
26-
no-unused-vars: [error, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, ignoreRestSiblings: true}]
27-
prefer-const: [2, {destructuring: all}]
28+
arrow-body-style: [0]
29+
camelcase: [0]
30+
comma-dangle: [2, only-multiline]
31+
consistent-return: [0]
32+
default-case: [0]
33+
func-names: [0]
34+
import/extensions: [0]
35+
max-len: [0]
36+
newline-per-chained-call: [0]
37+
no-alert: [0]
38+
no-continue: [0]
39+
no-mixed-operators: [0]
40+
no-multi-assign: [0]
41+
no-new: [0]
42+
no-param-reassign: [0]
43+
no-plusplus: [0]
44+
no-restricted-syntax: [0]
45+
no-shadow: [0]
46+
no-unused-vars: [2, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, ignoreRestSiblings: true}]
47+
no-use-before-define: [0]
2848
no-var: [2]
49+
one-var-declaration-per-line: [0]
50+
one-var: [0]
51+
prefer-const: [2, {destructuring: all}]
52+
prefer-destructuring: [0]
53+
radix: [2, as-needed]

CHANGELOG.md

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,44 @@ 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.10.0-RC2](https://github.com/go-gitea/gitea/releases/tag/v1.10.0-rc2) - 2019-10-30
7+
## [1.10.0](https://github.com/go-gitea/gitea/releases/tag/v1.10.0) - 2019-11-13
88
* BREAKING
99
* Fix deadline on update issue or PR via API (#8698)
1010
* Hide some user information via API if user doesn't have enough permission (#8655) (#8657)
11+
* Remove legacy handling of drone token (#8191)
12+
* Change repo search to use exact match for topic search. (#7941)
13+
* Add pagination for admin api get orgs and fix only list public orgs bug (#7742)
14+
* Implement the ability to change the ssh port to match what is in the gitea config (#7286)
15+
* SECURITY
16+
* Fix issue with user.fullname (#8903)
17+
* Ignore mentions for users with no access (#8395)
18+
* Be more strict with git arguments (#7715)
19+
* Extract the username and password from the mirror url (#7651)
20+
* reserve .well-known username (#7637)
21+
* FEATURE
22+
* Org/Members: display 2FA members states + optimize sql requests (#7621)
23+
* SetDefaultBranch on pushing to empty repository (#7610)
24+
* Adds side-by-side diff for images (#6784)
25+
* API method to list all commits of a repository (#6408)
26+
* Password Complexity Checks (#6230)
27+
* Add option to initialize repository with labels (#6061)
28+
* Add additional password hash algorithms (#6023)
1129
* BUGFIXES
30+
* Allow to merge if file path contains " or \ (#8629) (#8771)
31+
* On windows set core.longpaths true (#8776) (#8786)
32+
* Fix 500 when edit hook (#8782) (#8789)
33+
* Fix Checkbox at RepoSettings Protected Branch (#8799) (#8801)
34+
* Fix SSH2 conditional in key parsing code (#8806) (#8810)
35+
* Fix commit expand button to not go to commit link (#8745) (#8825)
36+
* Fix new user form for non-local users (#8826) (#8828)
37+
* Fix to close opened io resources as soon as not needed (#8839) (#8846)
38+
* Fix edit content button on migrated issue content (#8877) (#8884)
39+
* Fix require external registration password (#8885) (#8890)
40+
* Fix password complexity check on registration (#8887) (#8888)
41+
* Update Github Migration Tests (#8896) (#8938) (#8945)
42+
* Enable punctuations ending mentions (#8889) (#8894)
43+
* Add Close() method to gogitRepository (#8901) (#8956)
44+
* Hotfix for review actions and notifications (#8965)
1245
* Expose db.SetMaxOpenConns and allow non MySQL dbs to set conn pool params (#8528) (#8618)
1346
* Fix milestone close timestamp (#8728) (#8730)
1447
* Fix 500 when getting user as unauthenticated user (#8653) (#8663)
@@ -29,22 +62,6 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
2962
* Fix password complexity regex for special characters (#8524)
3063
* Prevent .code-view from overriding font on icon fonts (#8614) (#8627)
3164
* Allow more than 255 characters for tokens in external_login_user table (#8554)
32-
33-
## [1.10.0-RC1](https://github.com/go-gitea/gitea/releases/tag/v1.10.0-rc1) - 2019-10-14
34-
* BREAKING
35-
* Remove legacy handling of drone token (#8191)
36-
* Change repo search to use exact match for topic search. (#7941)
37-
* Add pagination for admin api get orgs and fix only list public orgs bug (#7742)
38-
* Implement the ability to change the ssh port to match what is in the gitea config (#7286)
39-
* FEATURE
40-
* Org/Members: display 2FA members states + optimize sql requests (#7621)
41-
* SetDefaultBranch on pushing to empty repository (#7610)
42-
* Adds side-by-side diff for images (#6784)
43-
* API method to list all commits of a repository (#6408)
44-
* Password Complexity Checks (#6230)
45-
* Add option to initialize repository with labels (#6061)
46-
* Add additional password hash algorithms (#6023)
47-
* BUGFIXES
4865
* Fix errors in create org UI regarding team access permission (#8506)
4966
* Fix bug on FindExternalUsersByProvider (#8504)
5067
* Create .ssh dir as necessary (#8486)
@@ -244,10 +261,6 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
244261
* Support setting cookie domain (#6288)
245262
* Move migrating repository from frontend to backend (#6200)
246263
* Delete releases attachments if release is deleted (#6068)
247-
* SECURITY
248-
* Ignore mentions for users with no access (#8395)
249-
* Be more strict with git arguments (#7715)
250-
* reserve .well-known username (#7637)
251264
* TRANSLATION
252265
* Latvian translation for home page (#8468)
253266
* Add home template italian translation (#8352)
@@ -276,7 +289,6 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
276289
* Fix global search result CSS, misc CSS tweaks (#7789)
277290
* Tweak label border CSS (#7739)
278291
* Fix create menu item widths (#7708)
279-
* Extract the username and password from the mirror url (#7651)
280292
* [Branch View] Delete duplicate protection symbol (#7624)
281293
* [Branch View] Delete Table Header (#7622)
282294
* [Branch View] icons to buttons (#7602)

Makefile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -444,13 +444,6 @@ css: npm
444444
$(foreach file, $(filter-out web_src/less/themes/_base.less, $(wildcard web_src/less/themes/*)),npx lessc --clean-css="--s0 -b" web_src/less/themes/$(notdir $(file)) > public/css/theme-$(notdir $(call strip-suffix,$(file))).css;)
445445
npx postcss --use autoprefixer --no-map --replace public/css/*
446446

447-
@diff=$$(git diff public/css/*); \
448-
if ([ -n "$$CI" ] && [ -n "$$diff" ]); then \
449-
echo "Generated files in public/css have changed, please commit the result:"; \
450-
echo "$${diff}"; \
451-
exit 1; \
452-
fi;
453-
454447
.PHONY: javascripts
455448
javascripts:
456449
echo "'make javascripts' is deprecated, please use 'make js'"

cmd/hook.go

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
"code.gitea.io/gitea/models"
1717
"code.gitea.io/gitea/modules/git"
1818
"code.gitea.io/gitea/modules/private"
19+
"code.gitea.io/gitea/modules/setting"
1920

2021
"github.com/urfave/cli"
2122
)
@@ -55,7 +56,13 @@ var (
5556

5657
func runHookPreReceive(c *cli.Context) error {
5758
if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 {
58-
return nil
59+
if setting.OnlyAllowPushIfGiteaEnvironmentSet {
60+
fail(`Rejecting changes as Gitea environment not set.
61+
If you are pushing over SSH you must push with a key managed by
62+
Gitea or set your environment appropriately.`, "")
63+
} else {
64+
return nil
65+
}
5966
}
6067

6168
setup("hooks/pre-receive.log")
@@ -115,7 +122,13 @@ func runHookPreReceive(c *cli.Context) error {
115122

116123
func runHookUpdate(c *cli.Context) error {
117124
if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 {
118-
return nil
125+
if setting.OnlyAllowPushIfGiteaEnvironmentSet {
126+
fail(`Rejecting changes as Gitea environment not set.
127+
If you are pushing over SSH you must push with a key managed by
128+
Gitea or set your environment appropriately.`, "")
129+
} else {
130+
return nil
131+
}
119132
}
120133

121134
setup("hooks/update.log")
@@ -125,7 +138,13 @@ func runHookUpdate(c *cli.Context) error {
125138

126139
func runHookPostReceive(c *cli.Context) error {
127140
if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 {
128-
return nil
141+
if setting.OnlyAllowPushIfGiteaEnvironmentSet {
142+
fail(`Rejecting changes as Gitea environment not set.
143+
If you are pushing over SSH you must push with a key managed by
144+
Gitea or set your environment appropriately.`, "")
145+
} else {
146+
return nil
147+
}
129148
}
130149

131150
setup("hooks/post-receive.log")

cmd/web.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,8 @@ func runWeb(ctx *cli.Context) error {
227227
log.Critical("Failed to start server: %v", err)
228228
}
229229
log.Info("HTTP Listener: %s Closed", listenAddr)
230-
graceful.WaitForServers()
230+
graceful.Manager.WaitForServers()
231+
graceful.Manager.WaitForTerminate()
231232
log.Close()
232233
return nil
233234
}

cmd/web_graceful.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// +build !windows
2-
31
// Copyright 2016 The Gitea Authors. All rights reserved.
42
// Use of this source code is governed by a MIT-style
53
// license that can be found in the LICENSE file.
@@ -27,11 +25,11 @@ func runHTTPSWithTLSConfig(listenAddr string, tlsConfig *tls.Config, m http.Hand
2725

2826
// NoHTTPRedirector tells our cleanup routine that we will not be using a fallback http redirector
2927
func NoHTTPRedirector() {
30-
graceful.InformCleanup()
28+
graceful.Manager.InformCleanup()
3129
}
3230

3331
// NoMainListener tells our cleanup routine that we will not be using a possibly provided listener
3432
// for our main HTTP/HTTPS service
3533
func NoMainListener() {
36-
graceful.InformCleanup()
34+
graceful.Manager.InformCleanup()
3735
}

cmd/web_windows.go

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)