Skip to content

Commit 5ad33db

Browse files
authored
Merge branch 'main' into lunny/system_hook_api
2 parents 70edff4 + b1a4eb4 commit 5ad33db

File tree

355 files changed

+4462
-2522
lines changed

Some content is hidden

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

355 files changed

+4462
-2522
lines changed

.air.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ tmp_dir = ".air"
55
cmd = "make backend"
66
bin = "gitea"
77
include_ext = ["go", "tmpl"]
8-
exclude_dir = ["modules/git/tests", "services/gitdiff/testdata", "modules/avatar/testdata"]
9-
include_dir = ["cmd", "models", "modules", "options", "routers", "services", "templates"]
8+
exclude_dir = ["modules/git/tests", "services/gitdiff/testdata", "modules/avatar/testdata", "models/fixtures", "models/migrations/fixtures", "modules/migration/file_format_testdata", "modules/avatar/identicon/testdata"]
9+
include_dir = ["cmd", "models", "modules", "options", "routers", "services"]
1010
exclude_regex = ["_test.go$", "_gen.go$"]

.drone.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ steps:
551551

552552
# TODO: We should probably build all dependencies into a test image
553553
- name: test-e2e
554-
image: mcr.microsoft.com/playwright:v1.28.0-focal
554+
image: mcr.microsoft.com/playwright:v1.29.0-focal
555555
commands:
556556
- curl -sLO https://go.dev/dl/go1.19.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.19.linux-amd64.tar.gz
557557
- groupadd --gid 1001 gitea && useradd -m --gid 1001 --uid 1001 gitea
@@ -928,10 +928,8 @@ trigger:
928928

929929
steps:
930930
- name: build-docs
931-
image: plugins/hugo:latest
932-
pull: always
931+
image: golang:1.19
933932
commands:
934-
- apk add --no-cache make bash curl
935933
- cd docs
936934
- make trans-copy clean build
937935

.eslintrc.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ rules:
255255
no-irregular-whitespace: [2]
256256
no-iterator: [2]
257257
no-label-var: [2]
258-
no-labels: [0]
258+
no-labels: [0] # handled by no-restricted-syntax
259259
no-lone-blocks: [2]
260260
no-lonely-if: [0]
261261
no-loop-func: [0]
@@ -335,7 +335,7 @@ rules:
335335
no-void: [2]
336336
no-warning-comments: [0]
337337
no-whitespace-before-property: [2]
338-
no-with: [0]
338+
no-with: [0] # handled by no-restricted-syntax
339339
nonblock-statement-body-position: [2]
340340
object-curly-newline: [0]
341341
object-curly-spacing: [2, never]
@@ -495,7 +495,7 @@ rules:
495495
unicorn/prefer-native-coercion-functions: [2]
496496
unicorn/prefer-negative-index: [2]
497497
unicorn/prefer-node-append: [0]
498-
unicorn/prefer-node-protocol: [0]
498+
unicorn/prefer-node-protocol: [2]
499499
unicorn/prefer-node-remove: [0]
500500
unicorn/prefer-number-properties: [0]
501501
unicorn/prefer-object-from-entries: [2]

CHANGELOG.md

Lines changed: 250 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,256 @@ 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.18.0](https://github.com/go-gitea/gitea/releases/tag/v1.18.0) - 2022-12-29
8+
9+
* SECURITY
10+
* Remove ReverseProxy authentication from the API (#22219) (#22251)
11+
* Support Go Vulnerability Management (#21139)
12+
* Forbid HTML string tooltips (#20935)
13+
* BREAKING
14+
* Rework mailer settings (#18982)
15+
* Remove U2F support (#20141)
16+
* Refactor `i18n` to `locale` (#20153)
17+
* Enable contenthash in filename for dynamic assets (#20813)
18+
* FEATURES
19+
* Add color previews in markdown (#21474)
20+
* Allow package version sorting (#21453)
21+
* Add support for Chocolatey/NuGet v2 API (#21393)
22+
* Add API endpoint to get changed files of a PR (#21177)
23+
* Add filetree on left of diff view (#21012)
24+
* Support Issue forms and PR forms (#20987)
25+
* Add support for Vagrant packages (#20930)
26+
* Add support for `npm unpublish` (#20688)
27+
* Add badge capabilities to users (#20607)
28+
* Add issue filter for Author (#20578)
29+
* Add KaTeX rendering to Markdown. (#20571)
30+
* Add support for Pub packages (#20560)
31+
* Support localized README (#20508)
32+
* Add support mCaptcha as captcha provider (#20458)
33+
* Add team member invite by email (#20307)
34+
* Added email notification option to receive all own messages (#20179)
35+
* Switch Unicode Escaping to a VSCode-like system (#19990)
36+
* Add user/organization code search (#19977)
37+
* Only show relevant repositories on explore page (#19361)
38+
* User keypairs and HTTP signatures for ActivityPub federation using go-ap (#19133)
39+
* Add sitemap support (#18407)
40+
* Allow creation of OAuth2 applications for orgs (#18084)
41+
* Add system setting table with cache and also add cache supports for user setting (#18058)
42+
* Add pages to view watched repos and subscribed issues/PRs (#17156)
43+
* Support Proxy protocol (#12527)
44+
* Implement sync push mirror on commit (#19411)
45+
* API
46+
* Allow empty assignees on pull request edit (#22150) (#22214)
47+
* Make external issue tracker regexp configurable via API (#21338)
48+
* Add name field for org api (#21270)
49+
* Show teams with no members if user is admin (#21204)
50+
* Add latest commit's SHA to content response (#20398)
51+
* Add allow_rebase_update, default_delete_branch_after_merge to repository api response (#20079)
52+
* Add new endpoints for push mirrors management (#19841)
53+
* ENHANCEMENTS
54+
* Add setting to disable the git apply step in test patch (#22130) (#22170)
55+
* Multiple improvements for comment edit diff (#21990) (#22007)
56+
* Fix button in branch list, avoid unexpected page jump before restore branch actually done (#21562) (#21928)
57+
* Fix flex layout for repo list icons (#21896) (#21920)
58+
* Fix vertical align of committer avatar rendered by email address (#21884) (#21918)
59+
* Fix setting HTTP headers after write (#21833) (#21877)
60+
* Color and Style enhancements (#21784, #21799) (#21868)
61+
* Ignore line anchor links with leading zeroes (#21728) (#21776)
62+
* Quick fixes monaco-editor error: "vs.editor.nullLanguage" (#21734) (#21738)
63+
* Use CSS color-scheme instead of invert (#21616) (#21623)
64+
* Respect user's locale when rendering the date range in the repo activity page (#21410)
65+
* Change `commits-table` column width (#21564)
66+
* Refactor git command arguments and make all arguments to be safe to be used (#21535)
67+
* CSS color enhancements (#21534)
68+
* Add link to user profile in markdown mention only if user exists (#21533, #21554)
69+
* Add option to skip index dirs (#21501)
70+
* Diff file tree tweaks (#21446)
71+
* Localize all timestamps (#21440)
72+
* Add `code` highlighting in issue titles (#21432)
73+
* Use Name instead of DisplayName in LFS Lock (#21415)
74+
* Consolidate more CSS colors into variables (#21402)
75+
* Redirect to new repository owner (#21398)
76+
* Use ISO date format instead of hard-coded English date format for date range in repo activity page (#21396)
77+
* Use weighted algorithm for string matching when finding files in repo (#21370)
78+
* Show private data in feeds (#21369)
79+
* Refactor parseTreeEntries, speed up tree list (#21368)
80+
* Add GET and DELETE endpoints for Docker blob uploads (#21367)
81+
* Add nicer error handling on template compile errors (#21350)
82+
* Add `stat` to `ToCommit` function for speed (#21337)
83+
* Support instance-wide OAuth2 applications (#21335)
84+
* Record OAuth client type at registration (#21316)
85+
* Add new CSS variables --color-accent and --color-small-accent (#21305)
86+
* Improve error descriptions for unauthorized_client (#21292)
87+
* Case-insensitive "find files in repo" (#21269)
88+
* Consolidate more CSS rules, fix inline code on arc-green (#21260)
89+
* Log real ip of requests from ssh (#21216)
90+
* Save files in local storage as group readable (#21198)
91+
* Enable fluid page layout on medium size viewports (#21178)
92+
* File header tweaks (#21175)
93+
* Added missing headers on user packages page (#21172)
94+
* Display image digest for container packages (#21170)
95+
* Skip dirty check for team forms (#21154)
96+
* Keep path when creating a new branch (#21153)
97+
* Remove fomantic image module (#21145)
98+
* Make labels clickable in the comments section. (#21137)
99+
* Sort branches and tags by date descending (#21136)
100+
* Better repo API unit checks (#21130)
101+
* Improve commit status icons (#21124)
102+
* Limit length of repo description and repo url input fields (#21119)
103+
* Show .editorconfig errors in frontend (#21088)
104+
* Allow poster to choose reviewers (#21084)
105+
* Remove black labels and CSS cleanup (#21003)
106+
* Make e-mail sanity check more precise (#20991)
107+
* Use native inputs in whitespace dropdown (#20980)
108+
* Enhance package date display (#20928)
109+
* Display total blob size of a package version (#20927)
110+
* Show language name on hover (#20923)
111+
* Show instructions for all generic package files (#20917)
112+
* Refactor AssertExistsAndLoadBean to use generics (#20797)
113+
* Move the official website link at the footer of gitea (#20777)
114+
* Add support for full name in reverse proxy auth (#20776)
115+
* Remove useless JS operation for relative time tooltips (#20756)
116+
* Replace some icons with SVG (#20741)
117+
* Change commit status icons to SVG (#20736)
118+
* Improve single repo action for issue and pull requests (#20730)
119+
* Allow multiple files in generic packages (#20661)
120+
* Add option to create new issue from /issues page (#20650)
121+
* Background color of private list-items updated (#20630)
122+
* Added search input field to issue filter (#20623)
123+
* Increase default item listing size `ISSUE_PAGING_NUM` to 20 (#20547)
124+
* Modify milestone search keywords to be case insensitive again (#20513)
125+
* Show hint to link package to repo when viewing empty repo package list (#20504)
126+
* Add Tar ZSTD support (#20493)
127+
* Make code review checkboxes clickable (#20481)
128+
* Add "X-Gitea-Object-Type" header for GET `/raw/` & `/media/` API (#20438)
129+
* Display project in issue list (#20434)
130+
* Prepend commit message to template content when opening a new PR (#20429)
131+
* Replace fomantic popup module with tippy.js (#20428)
132+
* Allow to specify colors for text in markup (#20363)
133+
* Allow access to the Public Organization Member lists with minimal permissions (#20330)
134+
* Use default values when provided values are empty (#20318)
135+
* Vertical align navbar avatar at middle (#20302)
136+
* Delete cancel button in repo creation page (#21381)
137+
* Include login_name in adminCreateUser response (#20283)
138+
* fix: icon margin in user/settings/repos (#20281)
139+
* Remove blue text on migrate page (#20273)
140+
* Modify milestone search keywords to be case insensitive (#20266)
141+
* Move some files into models' sub packages (#20262)
142+
* Add tooltip to repo icons in explore page (#20241)
143+
* Remove deprecated licenses (#20222)
144+
* Webhook for Wiki changes (#20219)
145+
* Share HTML template renderers and create a watcher framework (#20218)
146+
* Allow enable LDAP source and disable user sync via CLI (#20206)
147+
* Adds a checkbox to select all issues/PRs (#20177)
148+
* Refactor `i18n` to `locale` (#20153)
149+
* Disable status checks in template if none found (#20088)
150+
* Allow manager logging to set SQL (#20064)
151+
* Add order by for assignee no sort issue (#20053)
152+
* Take a stab at porting existing components to Vue3 (#20044)
153+
* Add doctor command to write commit-graphs (#20007)
154+
* Add support for authentication based on reverse proxy email (#19949)
155+
* Enable spellcheck for EasyMDE, use contenteditable mode (#19776)
156+
* Allow specifying SECRET_KEY_URI, similar to INTERNAL_TOKEN_URI (#19663)
157+
* Rework mailer settings (#18982)
158+
* Add option to purge users (#18064)
159+
* Add author search input (#21246)
160+
* Make rss/atom identifier globally unique (#21550)
161+
* BUGFIXES
162+
* Auth interface return error when verify failure (#22119) (#22259)
163+
* Use complete SHA to create and query commit status (#22244) (#22257)
164+
* Update bleve and zapx to fix unaligned atomic (#22031) (#22218)
165+
* Prevent panic in doctor command when running default checks (#21791) (#21807)
166+
* Load GitRepo in API before deleting issue (#21720) (#21796)
167+
* Ignore line anchor links with leading zeroes (#21728) (#21776)
168+
* Set last login when activating account (#21731) (#21755)
169+
* Fix UI language switching bug (#21597) (#21749)
170+
* Quick fixes monaco-editor error: "vs.editor.nullLanguage" (#21734) (#21738)
171+
* Allow local package identifiers for PyPI packages (#21690) (#21727)
172+
* Deal with markdown template without metadata (#21639) (#21654)
173+
* Fix opaque background on mermaid diagrams (#21642) (#21652)
174+
* Fix repository adoption on Windows (#21646) (#21650)
175+
* Sync git hooks when config file path changed (#21619) (#21626)
176+
* Fix 500 on PR files API (#21602) (#21607)
177+
* Fix `Timestamp.IsZero` (#21593) (#21603)
178+
* Fix viewing user subscriptions (#21482)
179+
* Fix mermaid-related bugs (#21431)
180+
* Fix branch dropdown shifting on page load (#21428)
181+
* Fix default theme-auto selector when nologin (#21346)
182+
* Fix and improve incorrect error messages (#21342)
183+
* Fix formatted link for PR review notifications to matrix (#21319)
184+
* Center-aligning content of WebAuthN page (#21127)
185+
* Remove follow from commits by file (#20765)
186+
* Fix commit status popup (#20737)
187+
* Fix init mail render logic (#20704)
188+
* Use correct page size for link header pagination (#20546)
189+
* Preserve unix socket file (#20499)
190+
* Use tippy.js for context popup (#20393)
191+
* Add missing parameter for error in log message (#20144)
192+
* Do not allow organisation owners add themselves as collaborator (#20043)
193+
* Rework file highlight rendering and fix yaml copy-paste (#19967)
194+
* Improve code diff highlight, fix incorrect rendered diff result (#19958)
195+
* TESTING
196+
* Improve OAuth integration tests (#21390)
197+
* Add playwright tests (#20123)
198+
* BUILD
199+
* Switch to building with go1.19 (#20695)
200+
* Update JS dependencies, adjust eslint (#20659)
201+
* Add more linters to improve code readability (#19989)
202+
203+
## [1.17.4](https://github.com/go-gitea/gitea/releases/tag/v1.17.4) - 2022-12-21
204+
205+
* SECURITY
206+
* Do not allow Ghost access to limited visible user/org (#21849) (#21875)
207+
* Fix package access for admins and inactive users (#21580) (#21592)
208+
* ENHANCEMENTS
209+
* Fix button in branch list, avoid unexpected page jump before restore branch actually done (#21562) (#21927)
210+
* Fix vertical align of committer avatar rendered by email address (#21884) (#21919)
211+
* Fix setting HTTP headers after write (#21833) (#21874)
212+
* Ignore line anchor links with leading zeroes (#21728) (#21777)
213+
* Enable Monaco automaticLayout (#21516)
214+
* BUGFIXES
215+
* Do not list active repositories as unadopted (#22034) (#22167)
216+
* Correctly handle moved files in apply patch (#22118) (#22136)
217+
* Fix condition for is_internal (#22095) (#22131)
218+
* Fix permission check on issue/pull lock (#22114)
219+
* Fix sorting admin user list by last login (#22081) (#22106)
220+
* Workaround for container registry push/pull errors (#21862) (#22069)
221+
* Fix issue/PR numbers (#22037) (#22045)
222+
* Handle empty author names (#21902) (#22028)
223+
* Fix ListBranches to handle empty case (#21921) (#22025)
224+
* Fix enabling partial clones on 1.17 (#21809)
225+
* Prevent panic in doctor command when running default checks (#21791) (#21808)
226+
* Upgrade golang.org/x/crypto (#21792) (#21794)
227+
* Init git module before database migration (#21764) (#21766)
228+
* Set last login when activating account (#21731) (#21754)
229+
* Add HEAD fix to gitea doctor (#21352) (#21751)
230+
* Fix UI language switching bug (#21597) (#21748)
231+
* Remove semver compatible flag and change pypi to an array of test cases (#21708) (#21729)
232+
* Allow local package identifiers for PyPI packages (#21690) (#21726)
233+
* Fix repository adoption on Windows (#21646) (#21651)
234+
* Sync git hooks when config file path changed (#21619) (#21625)
235+
* Added check for disabled Packages (#21540) (#21614)
236+
* Fix `Timestamp.IsZero` (#21593) (#21604)
237+
* Fix issues count bug (#21600)
238+
* Support binary deploy in npm packages (#21589)
239+
* Update milestone counters when issue is deleted (#21459) (#21586)
240+
* SessionUser protection against nil pointer dereference (#21581)
241+
* Case-insensitive NuGet symbol file GUID (#21409) (#21575)
242+
* Suppress `ExternalLoginUserNotExist` error (#21504) (#21572)
243+
* Prevent Authorization header for presigned LFS urls (#21531) (#21569)
244+
* Update binding to fix bugs (#21560)
245+
* Fix generating compare link (#21519) (#21530)
246+
* Ignore error when retrieving changed PR review files (#21487) (#21524)
247+
* Fix incorrect notification commit url (#21479) (#21483)
248+
* Display total commit count in hook message (#21400) (#21481)
249+
* Enforce grouped NuGet search results (#21442) (#21480)
250+
* Return 404 when user is not found on avatar (#21476) (#21477)
251+
* Normalize NuGet package version on upload (#22186) (#22201)
252+
* MISC
253+
* Check for zero time instant in TimeStamp.IsZero() (#22171) (#22173)
254+
* Fix warn in database structs sync (#22111)
255+
* Allow for resolution of NPM registry paths that match upstream (#21568) (#21723)
256+
7257
## [1.17.3](https://github.com/go-gitea/gitea/releases/tag/v1.17.3) - 2022-10-15
8258

9259
* SECURITY

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ To maintain understandable code and avoid circular dependencies it is important
190190
- **templates:** Golang templates for generating the html output.
191191
- **tests/e2e:** End to end tests
192192
- **tests/integration:** Integration tests
193+
- **tests/gitea-repositories-meta:** Sample repos used in integration tests. Adding a new repo requires editing `models/fixtures/repositories.yml` and `models/fixtures/repo_unit.yml` to match.
194+
- **tests/gitea-lfs-meta:** Sample LFS objects used in integration tests. Adding a new object requires editing `models/fixtures/lfs_meta_object.yml` to match.
193195
- **vendor:** External code that Gitea depends on.
194196

195197
## Documentation
@@ -439,7 +441,7 @@ be reviewed by two maintainers and must pass the automatic tests.
439441
Code that you contribute should use the standard copyright header:
440442

441443
```
442-
// Copyright 2022 The Gitea Authors. All rights reserved.
444+
// Copyright <year> The Gitea Authors. All rights reserved.
443445
// SPDX-License-Identifier: MIT
444446
445447
```

MAINTAINERS

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ Janis Estelmann <[email protected]> (@KN4CK3R)
4444
Steven Kriegler <[email protected]> (@justusbunsi)
4545
Jimmy Praet <[email protected]> (@jpraet)
4646
Leon Hofmeister <[email protected]> (@delvh)
47-
silentcode <[email protected]> (@silentcodeg)
4847
Wim <[email protected]> (@42wim)
49-
xinyu <[email protected]> (@penlinux)
48+
Xinyu Zhou <[email protected]> (@xin-u)
5049
Jason Song <[email protected]> (@wolfogre)
5150
Yarden Shoham <[email protected]> (@yardenshoham)

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ watch-frontend: node-check node_modules
359359

360360
.PHONY: watch-backend
361361
watch-backend: go-check
362-
$(GO) run $(AIR_PACKAGE) -c .air.toml
362+
GITEA_RUN_MODE=dev $(GO) run $(AIR_PACKAGE) -c .air.toml
363363

364364
.PHONY: test
365365
test: test-frontend test-backend

build/generate-images.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import imageminZopfli from 'imagemin-zopfli';
33
import {optimize} from 'svgo';
44
import {fabric} from 'fabric';
5-
import {readFile, writeFile} from 'fs/promises';
5+
import {readFile, writeFile} from 'node:fs/promises';
66

77
function exit(err) {
88
if (err) console.error(err);

build/generate-svg.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env node
22
import fastGlob from 'fast-glob';
33
import {optimize} from 'svgo';
4-
import {parse} from 'path';
5-
import {readFile, writeFile, mkdir} from 'fs/promises';
6-
import {fileURLToPath} from 'url';
4+
import {parse} from 'node:path';
5+
import {readFile, writeFile, mkdir} from 'node:fs/promises';
6+
import {fileURLToPath} from 'node:url';
77

88
const glob = (pattern) => fastGlob.sync(pattern, {
99
cwd: fileURLToPath(new URL('..', import.meta.url)),

cmd/dump_repo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import (
1010
"os"
1111
"strings"
1212

13-
"code.gitea.io/gitea/modules/convert"
1413
"code.gitea.io/gitea/modules/git"
1514
"code.gitea.io/gitea/modules/log"
1615
base "code.gitea.io/gitea/modules/migration"
1716
"code.gitea.io/gitea/modules/setting"
1817
"code.gitea.io/gitea/modules/structs"
1918
"code.gitea.io/gitea/modules/util"
19+
"code.gitea.io/gitea/services/convert"
2020
"code.gitea.io/gitea/services/migrations"
2121

2222
"github.com/urfave/cli"

0 commit comments

Comments
 (0)