Skip to content

Commit 77cedeb

Browse files
committed
Merge branch 'master' into imap
* master: (252 commits) Issues overview should not show issues from archived repos (go-gitea#13220) Display SVG files as images instead of text (go-gitea#14101) [skip ci] Updated translations via Crowdin Update docs to clarify issues raised in go-gitea#14272 (go-gitea#14318) [skip ci] Updated translations via Crowdin [Refactor] Passwort Hash/Set (go-gitea#14282) Add option to change username to the admin panel (go-gitea#14229) fix mailIssueCommentBatch for pull request (go-gitea#14252) Remove self from MAINTAINERS (go-gitea#14286) Do not reload page after adding comments in Pull Request reviews (go-gitea#13877) Fix session bug when introduce chi (go-gitea#14287) [skip ci] Updated translations via Crowdin Add secure/httpOnly attributes to the lang cookie (go-gitea#9690) (go-gitea#14279) Some code improvements (go-gitea#14266) [skip ci] Updated translations via Crowdin Fix wrong type on hooktask to convert typ from char(16) to varchar(16) (go-gitea#14148) Upgrade XORM links in documentation. (go-gitea#14265) Check permission for the appropriate unit type (go-gitea#14261) Add compliance check for windows to ensure cross platform build (go-gitea#14260) [skip ci] Updated translations via Crowdin ...
2 parents 5b5fb6c + 5640303 commit 77cedeb

File tree

1,053 files changed

+58256
-46110
lines changed

Some content is hidden

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

1,053 files changed

+58256
-46110
lines changed

.drone.yml

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,28 @@ steps:
3333
GOSUMDB: sum.golang.org
3434
TAGS: bindata sqlite sqlite_unlock_notify
3535

36+
- name: lint-backend-windows
37+
pull: always
38+
image: golang:1.15
39+
commands:
40+
- make golangci-lint vet
41+
environment:
42+
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
43+
GOSUMDB: sum.golang.org
44+
TAGS: bindata sqlite sqlite_unlock_notify
45+
GOOS: windows
46+
GOARCH: amd64
47+
48+
- name: lint-backend-gogit
49+
pull: always
50+
image: golang:1.15
51+
commands:
52+
- make lint-backend
53+
environment:
54+
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
55+
GOSUMDB: sum.golang.org
56+
TAGS: bindata gogit sqlite sqlite_unlock_notify
57+
3658
- name: checks-frontend
3759
image: node:14
3860
commands:
@@ -69,12 +91,24 @@ steps:
6991
GOPROXY: off
7092
GOOS: linux
7193
GOARCH: arm64
72-
TAGS: bindata
94+
TAGS: bindata gogit
7395
commands:
7496
- make backend # test cross compile
7597
- rm ./gitea # clean
7698
depends_on: [checks-backend]
7799

100+
- name: build-backend-windows
101+
image: golang:1.15
102+
environment:
103+
GO111MODULE: on
104+
GOPROXY: off
105+
GOOS: windows
106+
GOARCH: amd64
107+
TAGS: bindata gogit
108+
commands:
109+
- go build -mod=vendor -o gitea_windows
110+
depends_on: [checks-backend]
111+
78112
- name: build-backend-386
79113
image: golang:1.15
80114
environment:
@@ -173,6 +207,17 @@ steps:
173207
GITHUB_READ_TOKEN:
174208
from_secret: github_read_token
175209

210+
- name: unit-test-gogit
211+
pull: always
212+
image: golang:1.15
213+
commands:
214+
- make unit-test-coverage test-check
215+
environment:
216+
GOPROXY: off
217+
TAGS: bindata gogit sqlite sqlite_unlock_notify
218+
GITHUB_READ_TOKEN:
219+
from_secret: github_read_token
220+
176221
- name: test-mysql
177222
image: golang:1.15
178223
commands:
@@ -305,7 +350,8 @@ steps:
305350
- timeout -s ABRT 40m make test-sqlite-migration test-sqlite
306351
environment:
307352
GOPROXY: off
308-
TAGS: bindata
353+
TAGS: bindata gogit sqlite sqlite_unlock_notify
354+
TEST_TAGS: gogit sqlite sqlite_unlock_notify
309355
USE_REPO_TEST_DIR: 1
310356
depends_on:
311357
- build
@@ -318,7 +364,8 @@ steps:
318364
- timeout -s ABRT 40m make test-pgsql-migration test-pgsql
319365
environment:
320366
GOPROXY: off
321-
TAGS: bindata
367+
TAGS: bindata gogit
368+
TEST_TAGS: gogit
322369
TEST_LDAP: 1
323370
USE_REPO_TEST_DIR: 1
324371
depends_on:

.eslintrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ignorePatterns:
99

1010
parserOptions:
1111
sourceType: module
12-
ecmaVersion: 2020
12+
ecmaVersion: 2021
1313

1414
plugins:
1515
- eslint-plugin-unicorn
@@ -235,6 +235,7 @@ rules:
235235
no-new-symbol: [2]
236236
no-new-wrappers: [2]
237237
no-new: [0]
238+
no-nonoctal-decimal-escape: [2]
238239
no-obj-calls: [2]
239240
no-octal-escape: [2]
240241
no-octal: [2]
@@ -345,6 +346,7 @@ rules:
345346
unicorn/catch-error-name: [0]
346347
unicorn/consistent-function-scoping: [2]
347348
unicorn/custom-error-definition: [0]
349+
unicorn/empty-brace-spaces: [2]
348350
unicorn/error-message: [0]
349351
unicorn/escape-case: [0]
350352
unicorn/expiring-todo-comments: [0]
@@ -360,6 +362,7 @@ rules:
360362
unicorn/no-for-loop: [0]
361363
unicorn/no-hex-escape: [0]
362364
unicorn/no-keyword-prefix: [0]
365+
unicorn/no-lonely-if: [2]
363366
unicorn/no-nested-ternary: [0]
364367
unicorn/no-new-buffer: [0]
365368
unicorn/no-null: [0]
@@ -376,6 +379,7 @@ rules:
376379
unicorn/prefer-add-event-listener: [2]
377380
unicorn/prefer-array-find: [2]
378381
unicorn/prefer-dataset: [2]
382+
unicorn/prefer-date-now: [2]
379383
unicorn/prefer-event-key: [2]
380384
unicorn/prefer-includes: [2]
381385
unicorn/prefer-math-trunc: [2]

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
/vendor/** -text -eol linguist-vendored
33
/public/vendor/** -text -eol linguist-vendored
44
/templates/**/*.tmpl linguist-language=Handlebars
5+
/.eslintrc linguist-language=YAML
6+
/.stylelintrc linguist-language=YAML

.github/issue_template.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
<!--
44
1. Please speak English, this is the language all maintainers can speak and write.
5-
2. Please ask questions or configuration/deploy problems on our Discord
5+
2. Please ask questions or configuration/deploy problems on our Discord
66
server (https://discord.gg/gitea) or forum (https://discourse.gitea.io).
77
3. Please take a moment to check that your issue doesn't already exist.
8-
4. Please give all relevant information below for bug reports, because
8+
4. Make sure it's not mentioned in the FAQ (https://docs.gitea.io/en-us/faq)
9+
5. Please give all relevant information below for bug reports, because
910
incomplete details will be handled as an invalid report.
1011
-->
1112

.golangci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ issues:
101101
- path: cmd/dump.go
102102
linters:
103103
- dupl
104+
- path: services/webhook/webhook.go
105+
linters:
106+
- structcheck
104107
- text: "commentFormatting: put a space between `//` and comment text"
105108
linters:
106109
- gocritic

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
audit=false
2+
fund=false
13
package-lock=true
24
save-exact=true

CHANGELOG.md

Lines changed: 78 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,53 @@ 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.0-RC1](https://github.com/go-gitea/gitea/releases/tag/v1.13.0-rc1) - 2020-10-14
7+
## [1.13.1](https://github.com/go-gitea/gitea/releases/tag/v1.13.1) - 2020-12-29
88

99
* 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+
43+
## [1.13.0](https://github.com/go-gitea/gitea/releases/tag/v1.13.0) - 2020-12-01
44+
* SECURITY
45+
* Add Allow-/Block-List for Migrate & Mirrors (#13610) (#13776)
46+
* Prevent git operations for inactive users (#13527) (#13536)
47+
* Disallow urlencoded new lines in git protocol paths if there is a port (#13521) (#13524)
1048
* Mitigate Security vulnerability in the git hook feature (#13058)
1149
* Disable DSA ssh keys by default (#13056)
1250
* Set TLS minimum version to 1.2 (#12689)
1351
* Use argon as default password hash algorithm (#12688)
1452
* BREAKING
53+
* Set RUN_MODE prod by default (#13765) (#13767)
1554
* Don't replace underscores in auto-generated IDs in goldmark (#12805)
1655
* Add Primary Key to Topic and RepoTopic tables (#12639)
1756
* Disable password complexity check default (#12557)
@@ -71,6 +110,40 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
71110
* Add endpoint for Branch Creation (#11607)
72111
* Add pagination headers on endpoints that support total count from database (#11145)
73112
* BUGFIXES
113+
* Fix bogus http requests on diffs (#13760) (#13761)
114+
* Show 'owner' tag for real owner (#13689) (#13743)
115+
* Validate email before inserting/updating (#13475) (#13666)
116+
* Fix issue/pull request list assignee filter (#13647) (#13651)
117+
* Gitlab migration support for subdirectories (#13563) (#13591)
118+
* Fix logic for preferred license setting (#13550) (#13557)
119+
* Add missed sync branch/tag webhook (#13538) (#13556)
120+
* Migration won't fail on non-migrated reactions (#13507)
121+
* Fix Italian language file parsing error (#13156)
122+
* Show outdated comments in pull request (#13148) (#13162)
123+
* Fix parsing of pre-release git version (#13169) (#13172)
124+
* Fix diff skipping lines (#13154) (#13155)
125+
* When handling errors in storageHandler check underlying error (#13178) (#13193)
126+
* Fix size and clickable area on file table back link (#13205) (#13207)
127+
* Add better error checking for inline html diff code (#13251)
128+
* Fix initial commit page & binary munching problem (#13249) (#13258)
129+
* Fix migrations from remote Gitea instances when configuration not set (#13229) (#13273)
130+
* Store task errors following migrations and display them (#13246) (#13287)
131+
* Fix bug isEnd detection on getIssues/getPullRequests (#13299) (#13301)
132+
* When the git ref is unable to be found return broken pr (#13218) (#13303)
133+
* Ensure topics added using the API are added to the repository (#13285) (#13302)
134+
* Fix avatar autogeneration (#13233) (#13282)
135+
* Add migrated pulls to pull request task queue (#13331) (#13334)
136+
* Issue comment reactions should also check pull type on API (#13349) (#13350)
137+
* Fix links to repositories in /user/setting/repos (#13360) (#13362)
138+
* Remove obsolete change of email on profile page (#13341) (#13347)
139+
* Fix scrolling to resolved comment anchors (#13343) (#13371)
140+
* Storage configuration support `[storage]` (#13314) (#13379)
141+
* When creating line diffs do not split within an html entity (#13357) (#13375) (#13425) (#13427)
142+
* Fix reactions on code comments (#13390) (#13401)
143+
* Add missing full names when DEFAULT_SHOW_FULL_NAME is enabled (#13424)
144+
* Replies to outdated code comments should also be outdated (#13217) (#13433)
145+
* Fix panic bug in handling multiple references in commit (#13486) (#13487)
146+
* Prevent panic on git blame by limiting lines to 4096 bytes at most (#13470) (#13491)
74147
* Show original author's reviews on pull summary box (#13127)
75148
* Update golangci-lint to version 1.31.0 (#13102)
76149
* Fix line break for MS teams webhook (#13081)
@@ -140,6 +213,10 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
140213
* Fix Enter not working in SimpleMDE (#11564)
141214
* Fix bug about can't skip commits base on base branch (#11555)
142215
* ENHANCEMENTS
216+
* Only Return JSON for responses (#13511) (#13565)
217+
* Use existing analyzer module for language detection for highlighting (#13522) (#13551)
218+
* Return the full rejection message and errors in flash errors (#13221) (#13237)
219+
* Remove PAM from auth dropdown when unavailable (#13276) (#13281)
143220
* Add HostCertificate to sshd_config in Docker image (#13143)
144221
* Save TimeStamps for Star, Label, Follow, Watch and Collaboration to Database (#13124)
145222
* Improve error feedback for duplicate deploy keys (#13112)

CONTRIBUTING.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ import (
158158
To maintain understandable code and avoid circular dependencies it is important to have a good structure of the code. The gitea code is divided into the following parts:
159159

160160
- **integration:** Integrations tests
161-
- **models:** Contains the data structures used by xorm to construct database tables. It also contains supporting functions to query and update the database. Dependecies to other code in Gitea should be avoided although some modules might be needed (for example for logging).
161+
- **models:** Contains the data structures used by xorm to construct database tables. It also contains supporting functions to query and update the database. Dependencies to other code in Gitea should be avoided although some modules might be needed (for example for logging).
162162
- **models/fixtures:** Sample model data used in integration tests.
163163
- **models/migrations:** Handling of database migrations between versions. PRs that changes a database structure shall also have a migration step.
164164
- **modules:** Different modules to handle specific functionality in Gitea.
@@ -181,16 +181,16 @@ The same applies to status responses. If you notice a problem, feel free to leav
181181
All expected results (errors, success, fail messages) should be documented
182182
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/repo/issue.go#L319-L327)).
183183

184-
All JSON input types must be defined as a struct in `models/structs/`
184+
All JSON input types must be defined as a struct in [modules/structs/](modules/structs/)
185185
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/modules/structs/issue.go#L76-L91))
186186
and referenced in
187187
[routers/api/v1/swagger/options.go](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/swagger/options.go).
188188
They can then be used like the following:
189189
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/repo/issue.go#L318)).
190190

191-
All JSON responses must be defined as a struct in `models/structs/`
191+
All JSON responses must be defined as a struct in [modules/structs/](modules/structs/)
192192
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/modules/structs/issue.go#L36-L68))
193-
and referenced in its category in `routers/api/v1/swagger/`
193+
and referenced in its category in [routers/api/v1/swagger/](routers/api/v1/swagger/)
194194
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/swagger/issue.go#L11-L16))
195195
They can be used like the following:
196196
([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/repo/issue.go#L277-L279))
@@ -199,7 +199,7 @@ In general, HTTP methods are chosen as follows:
199199
* **GET** endpoints return requested object and status **OK (200)**
200200
* **DELETE** endpoints return status **No Content (204)**
201201
* **POST** endpoints return status **Created (201)**, used to **create** new objects (e.g. a User)
202-
* **PUT** endpoints return status **No Content (204)**, used to **add/assign** existing Obejcts (e.g. User) to something (e.g. Org-Team)
202+
* **PUT** endpoints return status **No Content (204)**, used to **add/assign** existing Objects (e.g. User) to something (e.g. Org-Team)
203203
* **PATCH** endpoints return changed object and status **OK (200)**, used to **edit/change** an existing object
204204

205205

@@ -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) <xiaolunwen@gmail.com>
298+
* [Lauris Bukšis-Haberkorns](https://gitea.com/lafriks) <lauris@nix.lv>
299+
* [Matti Ranta](https://gitea.com/techknowlogick) <techknowlogick@gitea.io>
300+
296301
* 2020-01-01 ~ 2020-12-31 - https://github.com/go-gitea/gitea/issues/9230
297302
* [Lunny Xiao](https://gitea.com/lunny) <xiaolunwen@gmail.com>
298303
* [Lauris Bukšis-Haberkorns](https://gitea.com/lafriks) <lauris@nix.lv>

MAINTAINERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,6 @@ Mura Li <typeless@ctli.io> (@typeless)
3636
6543 <6543@obermui.de> (@6543)
3737
jaqra <jaqra@hotmail.com> (@jaqra)
3838
David Svantesson <davidsvantesson@gmail.com> (@davidsvantesson)
39-
CirnoT <gitea.m@i32.pl> (@CirnoT)
4039
a1012112796 <1012112796@qq.com> (@a1012112796)
40+
Karl Heinz Marbaise <kama@soebes.de> (@khmarbaise)
41+
Norwin Roosen <git@nroo.de> (@noerw)

0 commit comments

Comments
 (0)