Skip to content

Commit cd6f2be

Browse files
authored
Merge branch 'master' into refactor_issues-subscription
2 parents 212aa8f + 21ae983 commit cd6f2be

File tree

92 files changed

+8158
-4699
lines changed

Some content is hidden

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

92 files changed

+8158
-4699
lines changed

.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

.eslintrc

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,51 @@
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
14+
node: true
1315

1416
globals:
1517
Clipboard: false
1618
CodeMirror: false
19+
Dropzone: false
1720
emojify: false
21+
hljs: false
1822
SimpleMDE: false
19-
Vue: false
20-
Dropzone: false
2123
u2fApi: false
22-
hljs: false
24+
Vue: false
2325

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

CHANGELOG.md

Lines changed: 42 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)
@@ -289,6 +301,14 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
289301
* wiki - editor - add buttons 'inline code', 'empty checkbox', 'checked checkbox' (#7243)
290302
* Fix Statuses API only shows first 10 statuses: Add paging and extend API GetCommitStatuses (#7141)
291303

304+
## [1.9.6](https://github.com/go-gitea/gitea/releases/tag/v1.9.6) - 2019-11-13
305+
* BUGFIXES
306+
* Allow to merge if file path contains " or \ (#8629) (#8772)
307+
* Fix 500 when edit hook (#8782) (#8790)
308+
* Fix issue with user.fullname (#8904)
309+
* Update Github Migration Test (#8897) (#8946)
310+
* Add Close() method to gogitRepository (#8901) (#8958)
311+
292312
## [1.9.5](https://github.com/go-gitea/gitea/releases/tag/v1.9.5) - 2019-10-30
293313
* BREAKING
294314
* Hide some user information via API if user doesn't have enough permission (#8655) (#8658)

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,8 @@ npm-update: npm-check
434434

435435
.PHONY: js
436436
js: npm
437-
npx eslint public/js
437+
npx eslint web_src/js webpack.config.js
438+
npx webpack
438439

439440
.PHONY: css
440441
css: npm

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

custom/conf/app.ini.sample

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ PROTOCOL = http
190190
DOMAIN = localhost
191191
ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
192192
; when STATIC_URL_PREFIX is empty it will follow APP_URL
193-
STATIC_URL_PREFIX =
193+
STATIC_URL_PREFIX =
194194
; The address to listen on. Either a IPv4/IPv6 address or the path to a unix socket.
195195
HTTP_ADDR = 0.0.0.0
196196
HTTP_PORT = 3000
@@ -383,6 +383,8 @@ MIN_PASSWORD_LENGTH = 6
383383
IMPORT_LOCAL_PATHS = false
384384
; Set to true to prevent all users (including admin) from creating custom git hooks
385385
DISABLE_GIT_HOOKS = false
386+
; Set to false to allow pushes to gitea repositories despite having an incomplete environment - NOT RECOMMENDED
387+
ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET = true
386388
;Comma separated list of character classes required to pass minimum complexity.
387389
;If left empty or no valid values are specified, the default values ("lower,upper,digit,spec") will be used.
388390
;Use "off" to disable checking.
@@ -515,9 +517,9 @@ SKIP_TLS_VERIFY = false
515517
; Number of history information in each page
516518
PAGING_NUM = 10
517519
; Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy
518-
PROXY_URL =
520+
PROXY_URL =
519521
; Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts.
520-
PROXY_HOSTS =
522+
PROXY_HOSTS =
521523

522524
[mailer]
523525
ENABLED = false

docs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
public/
22
templates/swagger/v1_json.tmpl
33
themes/
4+
resources/

0 commit comments

Comments
 (0)