]> source.dussan.org Git - gitea.git/log
gitea.git
3 years ago[API] pull notification subject status: add "merged" (#15344) (#15654)
6543 [Wed, 28 Apr 2021 19:24:56 +0000 (21:24 +0200)]
[API] pull notification subject status: add "merged" (#15344) (#15654)

Current subject status can be "", "open" and "closed". This add "merged" to it.

3 years agoRemove spurious set name from eventsource.sharedworker.js (#15643) (#15652)
zeripath [Wed, 28 Apr 2021 17:50:56 +0000 (18:50 +0100)]
Remove spurious set name from eventsource.sharedworker.js (#15643) (#15652)

Backport #15643

Fix #15617

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agonot update updated uinx for `git gc` (#15637) (#15641)
zeripath [Wed, 28 Apr 2021 00:20:47 +0000 (01:20 +0100)]
not update updated uinx for `git gc` (#15637) (#15641)

Backport #15637

fix #15634

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: a1012112796 <1012112796@qq.com>
3 years agoFix commit graph author link (#15627) (#15630)
zeripath [Mon, 26 Apr 2021 19:25:51 +0000 (20:25 +0100)]
Fix commit graph author link (#15627) (#15630)

Backport #15627

The author link on the commit graph is incorrect and isn't providing a link to the author.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agofix webhook timeout bug (#15613) (#15621)
Lunny Xiao [Mon, 26 Apr 2021 12:42:12 +0000 (20:42 +0800)]
fix webhook timeout bug (#15613) (#15621)

* Also fix the potential problem in httplib

3 years agoResolve panic on failed interface conversion in migration v156 (#15604) (#15610)
techknowlogick [Sun, 25 Apr 2021 15:58:42 +0000 (11:58 -0400)]
Resolve panic on failed interface conversion in migration v156 (#15604) (#15610)

go panics otherwise with `panic: interface conversion: error is git.ErrNotExist, not *git.ErrNotExist`, thanks to Codeberg/Andi for reporting this.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoBump unrolled/render to v1.1.0 (#15581) (#15608)
Nathan Smith [Sun, 25 Apr 2021 06:01:52 +0000 (23:01 -0700)]
Bump unrolled/render to v1.1.0 (#15581) (#15608)

v1.1.0 has improved buffer pooling

3 years agoFix missing storage init (#15589) (#15598)
Lunny Xiao [Fri, 23 Apr 2021 12:56:21 +0000 (20:56 +0800)]
Fix missing storage init (#15589) (#15598)

3 years agoIf the default branch is not present do not report error on stats indexing (follow...
zeripath [Thu, 22 Apr 2021 20:30:18 +0000 (21:30 +0100)]
If the default branch is not present do not report error on stats indexing (follow-up of #15546) (#15583) (#15594)

Backport #15546
Backport #15583

 #15546 doesn't completely fix this problem because the error returned is an ObjectNotExist
error not a BranchNotExist error.

Add test for ErrObjectNotExist too

Fix #15257

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix lfs management find (#15537) (#15578)
Lunny Xiao [Thu, 22 Apr 2021 18:32:48 +0000 (02:32 +0800)]
Fix lfs management find (#15537) (#15578)

* Fix lfs management find (#15537)

Fix #15236

* Do not do 40byte conversion within ParseTreeLine
* Missed a to40ByteSHA

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Andrew Thornton <art27@cantab.net>
* Remove space

Co-authored-by: Andrew Thornton <art27@cantab.net>
3 years agoAdd placeholder text to deploy key textarea (#15575) (#15576)
zeripath [Wed, 21 Apr 2021 21:59:50 +0000 (22:59 +0100)]
Add placeholder text to deploy key textarea (#15575) (#15576)

Backport #15575

Add placeholder text to deploy key textarea

Related #15574

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix NPE on view commit with notes (#15561) (#15573)
zeripath [Wed, 21 Apr 2021 19:11:43 +0000 (20:11 +0100)]
Fix NPE on view commit with notes (#15561) (#15573)

Backport #15561

Fix #15558

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoProject board improvements (#15429) (#15560)
silverwind [Tue, 20 Apr 2021 19:45:00 +0000 (21:45 +0200)]
Project board improvements (#15429) (#15560)

* Project board improvements

- Fix link colors
- Extract CSS to own file
- Various minor tweaks to make it look better

Fixes: https://github.com/go-gitea/gitea/issues/15424
Fixes: https://github.com/go-gitea/gitea/issues/15506
Fixes: https://github.com/go-gitea/gitea/pull/15511
* fix squashed cards on small view area

* more css fixes, add second row from issue list

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoAdd ETag header (#15370) (#15552)
KN4CK3R [Tue, 20 Apr 2021 16:01:58 +0000 (18:01 +0200)]
Add ETag header (#15370) (#15552)

* Add ETag header.

* Comply with RFC 7232.

* Moved logic into httpcache.go

* Changed name.

* Lint

* Implemented If-None-Match list.

* Fixed missing header on *

* Removed weak etag support.

* Removed * support.

* Added unit test.

* Lint

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoFix bug on commit graph (#15517) (#15530)
Lunny Xiao [Sat, 17 Apr 2021 12:46:30 +0000 (20:46 +0800)]
Fix bug on commit graph (#15517) (#15530)

3 years agoSend size to /avatars if requested (#15459) (#15528)
zeripath [Sat, 17 Apr 2021 11:30:58 +0000 (12:30 +0100)]
Send size to /avatars if requested (#15459) (#15528)

Backport #15459

If an avatar is requested in a particular size ensure that /avatars also gets the size request

Fix #15453

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoPrevent migration 156 failure if tag commit missing (#15519) (#15527)
zeripath [Sat, 17 Apr 2021 10:13:15 +0000 (11:13 +0100)]
Prevent migration 156 failure if tag commit missing (#15519) (#15527)

Backport #15519

It is possible that tag commits could be deleted or missing from repos. This causes
migration 156 to fail and breaks upgrade.

This PR simply logs the failure.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoRepo branch page: label size, PR ref, new PR button alignment (#15363) (#15365)
Mike L [Fri, 16 Apr 2021 05:53:51 +0000 (07:53 +0200)]
Repo branch page: label size, PR ref, new PR button alignment (#15363) (#15365)

3 years agoChangelog v1.14.1 (#15498) v1.14.1
6543 [Fri, 16 Apr 2021 02:19:09 +0000 (04:19 +0200)]
Changelog v1.14.1 (#15498)

* RAW Changelog v1.14.1

* wordings

* Apply suggestions from code review

Co-authored-by: techknowlogick <matti@mdranta.net>
* Update CHANGELOG.md

Co-authored-by: 6543 <6543@obermui.de>
* Update CHANGELOG.md

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoPerformance improvement for list pull requests (#15447) (#15500)
6543 [Thu, 15 Apr 2021 22:14:14 +0000 (00:14 +0200)]
Performance improvement for list pull requests (#15447) (#15500)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoFix bug clone wiki (#15499) (#15502)
zeripath [Thu, 15 Apr 2021 19:40:10 +0000 (20:40 +0100)]
Fix bug clone wiki (#15499) (#15502)

Backport #15499

Fix #15494

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agodump: Add option to skip LFS/attachment files (#15407) (#15492)
zeripath [Thu, 15 Apr 2021 15:41:47 +0000 (16:41 +0100)]
dump: Add option to skip LFS/attachment files (#15407) (#15492)

Backport #15407

* Add option to skip dumping LFS/attachment files

* Fix fmt issues

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Johan Van de Wauw <johan@gisky.be>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoEnsure review dismissal only dismisses the correct review (#15477) (#15489)
zeripath [Thu, 15 Apr 2021 15:24:59 +0000 (16:24 +0100)]
Ensure review dismissal only dismisses the correct review (#15477) (#15489)

Backport #15477

Fix #15472

Signed-off-by: Andrew Thornton art27@cantab.net
Co-authored-by: 6543 <6543@obermui.de>
3 years agoUse subdir for URL (#15446) (#15493)
zeripath [Thu, 15 Apr 2021 15:24:30 +0000 (16:24 +0100)]
Use subdir for URL (#15446) (#15493)

Backport #15446

Fixes #15444

Co-authored-by: KN4CK3R <KN4CK3R@users.noreply.github.com>
Co-authored-by: KN4CK3R <KN4CK3R@users.noreply.github.com>
3 years agomigration: github: if rate limit is not enabled, ignore it (#15490) (#15495)
6543 [Thu, 15 Apr 2021 15:24:01 +0000 (17:24 +0200)]
migration: github: if rate limit is not enabled, ignore it (#15490) (#15495)

Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoUse index of the supported tags to choose user lang (#15452) (#15488)
zeripath [Thu, 15 Apr 2021 14:47:43 +0000 (15:47 +0100)]
Use index of the supported tags to choose user lang (#15452) (#15488)

Backport #15452

Fix #14793.

The previous implementation used the first return value of matcher.Match, which is the chosen language tag but may contain extensions such as de-DE-u-rg-chzzzz.

As mentioned in the documentation of language package, matcher.Match also returns the index of the supported tags, so I think it is better to use it rather than manipulate the returned language tag.

Co-authored-by: Naohisa Murakami <tiqwab.ch90@gmail.com>
3 years agoFix potential copy lfs records failure when fork a repository (#15441) (#15485)
Lunny Xiao [Thu, 15 Apr 2021 14:13:14 +0000 (22:13 +0800)]
Fix potential copy lfs records failure when fork a repository (#15441) (#15485)

3 years agoQuery the DB for the hash before inserting in to email_hash (#15457) (#15491)
zeripath [Thu, 15 Apr 2021 13:29:13 +0000 (14:29 +0100)]
Query the DB for the hash before inserting in to email_hash (#15457) (#15491)

Backport #15457

Some postgres users have logging which logs even failed transactions. So
just query the db before trying to insert.

Fix #15451

Signed-off-by: Andrew Thornton art27@cantab.net
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoBuild go-git variants for windows (#15482) (#15487)
zeripath [Thu, 15 Apr 2021 12:21:27 +0000 (13:21 +0100)]
Build go-git variants for windows (#15482) (#15487)

Backport #15482

It appears that there are significant performance problems with the pure git backend
on windows.

Therefore until we can sort this out - provide go-git backend builds.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoLock down build-images dependencies (#15480)
silverwind [Thu, 15 Apr 2021 11:02:57 +0000 (13:02 +0200)]
Lock down build-images dependencies (#15480)

Partial extraction from #15479 for 1.14. Locks down build-images
dependencies and adds missing node_modules dependency.

3 years agoPrevent superfluous response.WriteHeader (#15456) (#15476)
zeripath [Thu, 15 Apr 2021 10:02:42 +0000 (11:02 +0100)]
Prevent superfluous response.WriteHeader (#15456) (#15476)

Backport #15456

This PR simply checks the status before writing the header.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agofix wrong file link in code search page (#15466) (#15486)
a1012112796 [Thu, 15 Apr 2021 09:04:25 +0000 (17:04 +0800)]
fix wrong file link in code search page (#15466) (#15486)

in previous the grenrated link is
``testg/testrepo/src/commit/....``
which is not right.

the right version is ``/testg/testrepo/.......``
(start wiht ``/``)
or ``http://127.0.0.1:3000/xxxxx`` (full link)

to make it hase same result with explore page
I choose the secound style.

fix #15438

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoClone panel fixes (#15436)
silverwind [Wed, 14 Apr 2021 21:16:33 +0000 (23:16 +0200)]
Clone panel fixes (#15436)

- Use <button> over <div> for a button
- Fix absent border-right on wiki
- Fix absent border-radius on wiki

3 years agoquick fix (#15464) (#15481)
John Olheiser [Wed, 14 Apr 2021 19:42:30 +0000 (14:42 -0500)]
quick fix (#15464) (#15481)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
3 years agoFix ambiguous argument error on tags (#15432) (#15474)
zeripath [Wed, 14 Apr 2021 18:53:01 +0000 (19:53 +0100)]
Fix ambiguous argument error on tags (#15432) (#15474)

Backport #15432

There is a weird gotcha with GetTagCommitID that because it uses git rev-list
can cause an ambiguous argument error.

This PR simply makes tags use the same code as branches.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agov172 migration adds created_unix field instead of expiry (#15458) (#15463)
techknowlogick [Wed, 14 Apr 2021 06:03:42 +0000 (02:03 -0400)]
v172 migration adds created_unix field instead of expiry (#15458) (#15463)

The Session table must have an Expiry field not a created_unix field - somehow
this migration adds the incorrect named field leading to #15445 reports.

Fix #15445

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
3 years agoFix repository search (#15428) (#15442)
techknowlogick [Tue, 13 Apr 2021 04:30:28 +0000 (00:30 -0400)]
Fix repository search (#15428) (#15442)

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: KN4CK3R <KN4CK3R@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoPrevent NPE on avatar direct rendering if federated avatars disabled (#15434) (#15439)
techknowlogick [Tue, 13 Apr 2021 02:50:07 +0000 (22:50 -0400)]
Prevent NPE on avatar direct rendering if federated avatars disabled (#15434) (#15439)

#13649 assumed that direct avatar urls would always be libravatar urls - this leads
to NPEs if federated avatar service is disabled.

Fix #15421

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
3 years agoFix wiki clone urls (#15430) (#15431)
silverwind [Mon, 12 Apr 2021 21:59:56 +0000 (23:59 +0200)]
Fix wiki clone urls (#15430) (#15431)

Fix wiki clone urls

Regressed by: https://github.com/go-gitea/gitea/commit/9a4050f1e839af1bd072aff9ac5fc69e650747c8
Fixes: https://github.com/go-gitea/gitea/issues/15420
3 years agofix dingtalk icon url (#15426)
Tomás Warynyca [Mon, 12 Apr 2021 15:10:49 +0000 (12:10 -0300)]
fix dingtalk icon url (#15426)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoStandardise icon on projects PR page (#15387) (#15408)
zeripath [Mon, 12 Apr 2021 08:05:20 +0000 (09:05 +0100)]
Standardise icon on projects PR page (#15387) (#15408)

Backport #15387

Fix #15272

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agouse repo1_bare to test against (#15402) (#15404)
6543 [Sun, 11 Apr 2021 17:48:35 +0000 (19:48 +0200)]
use repo1_bare to test against (#15402) (#15404)

3 years agoUse semantic dropdown for code search query type (#15276) (#15364)
Mike L [Sun, 11 Apr 2021 15:50:03 +0000 (17:50 +0200)]
Use semantic dropdown for code search query type (#15276) (#15364)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoChangelog v1.14.0 (#15360) v1.14.0
6543 [Sun, 11 Apr 2021 04:07:02 +0000 (06:07 +0200)]
Changelog v1.14.0 (#15360)

* clean & merge & update v1.14.0 changelog

* backport v1.13.x changelogs

3 years agoFix delete nonexist oauth application 500 and prevent deadlock (#15384) (#15396)
Lunny Xiao [Sun, 11 Apr 2021 02:57:44 +0000 (10:57 +0800)]
Fix delete nonexist oauth application 500 and prevent deadlock (#15384) (#15396)

* Fix delete nonexist oauth application 500

* Fix test

* Close the session

* Fix more missed sess.Close

* Remove unnecessary blank line

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoAlways set the merge base used to merge the commit (#15352) (#15385)
zeripath [Sat, 10 Apr 2021 12:08:30 +0000 (13:08 +0100)]
Always set the merge base used to merge the commit (#15352) (#15385)

Backport #15352

The issue is that the TestPatch will reset the PR MergeBase - and it is possible for TestPatch to update the MergeBase whilst a merge is ongoing. The ensuing merge will then complete but it doesn't re-set the MergeBase it used to merge the PR.

Fixes the intermittent error in git test.

Signed-off-by: Andrew Thornton art27@cantab.net
3 years agoTurn RepoRef and RepoAssignment back into func(*Context) (#15372) (#15377)
zeripath [Sat, 10 Apr 2021 02:24:40 +0000 (03:24 +0100)]
Turn RepoRef and RepoAssignment back into func(*Context) (#15372) (#15377)

Backport #15372

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoDropzone styling improvements (#15291) (#15374)
silverwind [Fri, 9 Apr 2021 23:43:36 +0000 (01:43 +0200)]
Dropzone styling improvements (#15291) (#15374)

* Dropzone styling improvements

- Move all dropzone styles to separate file
- Fix white background in arc-green
- Fix rendering of non-square images and previews

* increase thumbnail quality, set contain in js, replace blur effect with opacity

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoUpgrade to bluemonday 1.0.7 (#15379) (#15380)
zeripath [Fri, 9 Apr 2021 23:41:30 +0000 (00:41 +0100)]
Upgrade to bluemonday 1.0.7 (#15379) (#15380)

* Upgrade to bluemonday 1.0.7 (#15379)

Backport #15379

Fix #15349

Signed-off-by: Andrew Thornton <art27@cantab.net>
* resolve CI

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoMove FCGI req.URL.Path fix-up to the FCGI listener (#15292) (#15361)
zeripath [Fri, 9 Apr 2021 16:45:02 +0000 (17:45 +0100)]
Move FCGI req.URL.Path fix-up to the FCGI listener (#15292) (#15361)

Backport #15292

Simplify the web.go FCGI path by moving the req.URL.Path fix-up to listener

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago Fix `admin user list` (#15358) (#15359)
6543 [Fri, 9 Apr 2021 10:39:40 +0000 (12:39 +0200)]
 Fix `admin user list` (#15358)  (#15359)

* Fix `admin user list` (#15358)

* fix routers/api/v1/repo/issue.go

3 years agoFix button border issue (#15351)
silverwind [Fri, 9 Apr 2021 03:38:06 +0000 (05:38 +0200)]
Fix button border issue (#15351)

3 years agoDisable cssnano's colormin plugin (#15348)
silverwind [Fri, 9 Apr 2021 01:54:24 +0000 (03:54 +0200)]
Disable cssnano's colormin plugin (#15348)

It produces odd rgba values which also seem to cause issues in monaco's
color parser where the scoll shadow went red for some reason.

Regression by: https://github.com/go-gitea/gitea/pull/15333

3 years agoShow diff on rename with diff changes (#15338) (#15339)
zeripath [Thu, 8 Apr 2021 19:36:17 +0000 (20:36 +0100)]
Show diff on rename with diff changes (#15338) (#15339)

Backport #15338

More recent versions of git have increased support for detection of renames meaning
that a rename with diff changes is now supported.

Although ParsePatch supports this - our templates do not and the simplest solution
is simply to show the diff.

Fix #15335

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoPrepend AppSubUrl to links for default avatar (#15341) (#15342)
zeripath [Thu, 8 Apr 2021 16:51:10 +0000 (17:51 +0100)]
Prepend AppSubUrl to links for default avatar (#15341) (#15342)

Backport #15341

Fix #15334

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix handling of logout event (#15323) (#15337)
zeripath [Thu, 8 Apr 2021 15:28:30 +0000 (16:28 +0100)]
Fix handling of logout event (#15323) (#15337)

Backport #15323

It appears that there is a slight bug in the handling of the data of logout event -
the javascript should be testing the data field of the data field for the logout
instruction.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoMonaco improvements (#15333) (#15345)
silverwind [Thu, 8 Apr 2021 11:24:23 +0000 (13:24 +0200)]
Monaco improvements (#15333) (#15345)

- Create theme at runtime which follows the CSS variables of the site
- Disable a few opinionated Monaco defaults like minimap and word highlights
- Move styles to separate file

3 years agoFix CanCreateRepo check (#15311) (#15321)
6543 [Wed, 7 Apr 2021 20:14:11 +0000 (22:14 +0200)]
Fix CanCreateRepo check (#15311) (#15321)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
3 years agoFix xorm log stack level (#15285) (#15316)
6543 [Wed, 7 Apr 2021 07:36:15 +0000 (09:36 +0200)]
Fix xorm log stack level (#15285) (#15316)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoReduce memory usage in testgit (#15306) (#15310)
6543 [Wed, 7 Apr 2021 03:07:39 +0000 (05:07 +0200)]
Reduce memory usage in testgit (#15306) (#15310)

* reduce memory use in rawtest

* just use hashsum for diffs

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoClose file on invalid range (Addition to #15166) (#15268) (#15308)
KN4CK3R [Tue, 6 Apr 2021 19:25:31 +0000 (21:25 +0200)]
Close file on invalid range (Addition to #15166) (#15268) (#15308)

* Close file on invalid range.

* Close on seek error

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Moved 'Seek' into server.

* io.ReadSeekCloser is only available in Go 1.16

Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoFix bug in Wrap (#15302) (#15309)
6543 [Tue, 6 Apr 2021 16:44:24 +0000 (18:44 +0200)]
Fix bug in Wrap (#15302) (#15309)

Whilst doing other work I have noticed that there is an issue with Wrap when passing an
http.Handler - the next should be the next handler in line not empty.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
3 years agoUpdate to bluemonday-1.0.6 (#15294) (#15297)
6543 [Tue, 6 Apr 2021 00:36:58 +0000 (02:36 +0200)]
Update to bluemonday-1.0.6 (#15294) (#15297)

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
3 years agoDrop the event source if we are unauthorized (#15275) (#15280)
zeripath [Mon, 5 Apr 2021 00:39:22 +0000 (01:39 +0100)]
Drop the event source if we are unauthorized (#15275) (#15280)

Backport #15275

A previous commit that sent unauthorized if the user is unauthorized
simply leads to the repeated reopening of the eventsource. #

This PR changes the event returned to tell the client to close the
eventsource and thus prevents the repeated reopening.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoAdd size to Save function (#15264) (#15270)
zeripath [Sun, 4 Apr 2021 16:04:55 +0000 (17:04 +0100)]
Add size to Save function (#15264) (#15270)

This PR proposes an alternative solution to #15255 - just add the size to the
save function. Yes it is less apparently clean but it may be more correct.

Close #15255
Fix #15253

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoBranch page and misc css improvements (#15208) (#15274)
silverwind [Sun, 4 Apr 2021 13:31:54 +0000 (15:31 +0200)]
Branch page and misc css improvements (#15208) (#15274)

- Improve branches page, increase icon size, use octicons, use css vars
- Style placeholder color via css var
- Slightly increase contrast of input fields and active/hover states
- Add styling for select boxes in arc-green

3 years agoupdate golang libraries (#15258) (#15259)
techknowlogick [Sat, 3 Apr 2021 08:42:18 +0000 (04:42 -0400)]
update golang libraries (#15258) (#15259)

3 years agoFix graph pagination (#15225) (#15249)
KN4CK3R [Fri, 2 Apr 2021 03:29:14 +0000 (05:29 +0200)]
Fix graph pagination (#15225) (#15249)

* Fixed invalid HTML tag.

* Fixed pagination.

* Update templates/repo/graph/commits.tmpl

Co-authored-by: zeripath <art27@cantab.net>
3 years agoresponse 404 for diff/patch of a commit that not exist (#15221) (#15237)
a1012112796 [Thu, 1 Apr 2021 23:57:05 +0000 (07:57 +0800)]
response 404 for diff/patch of a commit that not exist (#15221) (#15237)

* response 404 for diff/patch of a commit that not exist

fix #15217

Signed-off-by: a1012112796 <1012112796@qq.com>
* Update routers/repo/commit.go

Co-authored-by: silverwind <me@silverwind.io>
* use ctx.NotFound()

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoSpeed up `enry.IsVendor` (#15213) (#15245)
zeripath [Thu, 1 Apr 2021 23:16:00 +0000 (00:16 +0100)]
Speed up `enry.IsVendor` (#15213) (#15245)

Backport #15213

`enry.IsVendor` is kinda slow as it simply iterates across all regexps.
This PR ajdusts the regexps to combine them to make this process a
little quicker.

Related #15143

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoPrevent NPE in CommentMustAsDiff if no hunk header (#15199) (#15200)
zeripath [Thu, 1 Apr 2021 19:14:56 +0000 (20:14 +0100)]
Prevent NPE in CommentMustAsDiff if no hunk header (#15199) (#15200)

Backport #15199

I do not understand how this can happen or why.

There is an apparent possibility for a comment.Patch to be missing a hunk header
- this should not happen and do not understand how. But it appears to happen on
1.13 at least in some case.

This PR will simply add a new section if the cursection is empty
thus preventing the NPE.

Fix #15198

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoFix timezone bug when clicking heatmap (#15141) (#15231)
mayswind [Thu, 1 Apr 2021 10:22:54 +0000 (18:22 +0800)]
Fix timezone bug when clicking heatmap (#15141) (#15231)

3 years agoDiff box fixes (#15214) (#15227)
silverwind [Thu, 1 Apr 2021 05:04:47 +0000 (07:04 +0200)]
Diff box fixes (#15214) (#15227)

- Fix misaligned "Show Outdated" buttons via flexbox
- Add hover effect to "Show Outdated" buttons
- Remove overreaching margin from selector .diff-file-box and handle
  cases individually.

Fixes: https://github.com/go-gitea/gitea/issues/15097
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoImprove /api/v1/repos/issues/search by just getting repo ids (#15179) (#15192)
zeripath [Wed, 31 Mar 2021 23:15:08 +0000 (00:15 +0100)]
Improve /api/v1/repos/issues/search by just getting repo ids (#15179) (#15192)

Backport #15179

/api/v1/repos/issues/search is a highly inefficient search which is unfortunately
the basis for our dependency searching algorithm. In particular it currently loads
all of the repositories and their owners and their primary coding language all of
which is immediately thrown away.

This PR makes one simple change - just get the IDs.

Related #14560
Related #12827

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix regression from #14623 - use debug SVC handler only on interactive sessions ...
zeripath [Wed, 31 Mar 2021 19:49:46 +0000 (20:49 +0100)]
Fix regression from #14623 - use debug SVC handler only on interactive sessions (#15210) (#15211)

Backport #15210

Unfortunately #14623 changed from the deprecated IsInteractiveSession to
IsWindowsService without recognising that they are the complement of
each other.

This means that Windows SVC control is not working correctly. This PR
adds some Tracing statements but also fixes the bug.

Fix #15159

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoadd 'fonts' into 'KnownPublicEntries' (#15188) (#15218)
a1012112796 [Wed, 31 Mar 2021 02:56:19 +0000 (10:56 +0800)]
add 'fonts' into 'KnownPublicEntries' (#15188) (#15218)

fix #15184

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoFix webhook delivery and issue checklist for arc-green (#15195) (#15204)
silverwind [Tue, 30 Mar 2021 11:15:12 +0000 (13:15 +0200)]
Fix webhook delivery and issue checklist for arc-green (#15195) (#15204)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoFix margin between avatars on org pages (#15194) (#15197)
silverwind [Mon, 29 Mar 2021 21:36:00 +0000 (23:36 +0200)]
Fix margin between avatars on org pages (#15194) (#15197)

Fixes: https://github.com/go-gitea/gitea/issues/15191
3 years agoshould run RetrieveRepoMetas() for empty pr (#15187) (#15190)
a1012112796 [Mon, 29 Mar 2021 16:02:01 +0000 (00:02 +0800)]
should run RetrieveRepoMetas() for empty pr (#15187) (#15190)

Signed-off-by: a1012112796 <1012112796@qq.com>
3 years agofix org navbar (#15174)
Norwin [Sat, 27 Mar 2021 14:57:02 +0000 (14:57 +0000)]
fix org navbar (#15174)

Co-authored-by: Jimmy Praet <jimmy.praet@telenet.be>
3 years agoClusterfuzz found another way (#15160) (#15168)
zeripath [Sat, 27 Mar 2021 02:48:38 +0000 (02:48 +0000)]
Clusterfuzz found another way (#15160) (#15168)

Backport #15160

Clusterfuzz found another way so I found another way to stop it

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix wrong user returned in API (#15139) (#15151)
sotho [Fri, 26 Mar 2021 03:20:52 +0000 (04:20 +0100)]
Fix wrong user returned in API (#15139) (#15151)

The API call: GET /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments
returns always the reviewer, but should return the poster.

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
3 years agoFix Migration 176 yet again (#15132) v1.14.0-rc2
zeripath [Tue, 23 Mar 2021 23:18:05 +0000 (23:18 +0000)]
Fix Migration 176 yet again (#15132)

Backport #15131

Whilst creating a test for v176 in the migrations_test PR
it has become clear that this was still wrong.

This is now fixed. Genuinely.

Also fix repo transfer

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoupdate changelog for rc2 release (#15130)
6543 [Tue, 23 Mar 2021 19:52:43 +0000 (20:52 +0100)]
update changelog for rc2 release (#15130)

3 years agoFix consistency check (#15120) (#15128)
zeripath [Tue, 23 Mar 2021 19:20:34 +0000 (19:20 +0000)]
Fix consistency check (#15120) (#15128)

In my last fix I missed adding the label_ prefix to the
consistency check count.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix bug on avatar middleware (#15124) (#15126)
6543 [Tue, 23 Mar 2021 18:44:37 +0000 (19:44 +0100)]
Fix bug on avatar middleware (#15124) (#15126)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years ago[Vendor] update gitea-sdk v0.14.0 (#15103) (#15107)
6543 [Tue, 23 Mar 2021 10:10:32 +0000 (11:10 +0100)]
[Vendor] update gitea-sdk v0.14.0 (#15103) (#15107)

* upgraded code.gitea.io/sdk/gitea v0.13.2 => v0.14.0

* rm workaround

3 years agoChangelog for v1.14-rc2 (#15115)
zeripath [Mon, 22 Mar 2021 21:00:51 +0000 (21:00 +0000)]
Changelog for v1.14-rc2 (#15115)

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix another clusterfuzz identified issue (#15096) (#15113)
zeripath [Mon, 22 Mar 2021 19:16:08 +0000 (19:16 +0000)]
Fix another clusterfuzz identified issue (#15096) (#15113)

Backport #15096

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoFix the v176 migration (#15110) (#15111)
zeripath [Mon, 22 Mar 2021 18:47:58 +0000 (18:47 +0000)]
Fix the v176 migration (#15110) (#15111)

Backport #15110

There is a serious issue with the v176 migration where there is a mistaken missing
label_id selection.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix lock modal content rendering outside modal (#15095) (#15100)
silverwind [Mon, 22 Mar 2021 01:00:42 +0000 (02:00 +0100)]
Fix lock modal content rendering outside modal (#15095) (#15100)

* Fix lock modal content rendering outside modal

The .content was not a child to .modal so was rendering outside. This is
a recent regression but I'm not certain when it was introduced.

* remove extraneous closing div

Co-authored-by: zeripath <art27@cantab.net>
3 years agoPlace wrapper around comment as diff to catch panics (#15085) (#15094)
zeripath [Sun, 21 Mar 2021 22:41:40 +0000 (22:41 +0000)]
Place wrapper around comment as diff to catch panics (#15085) (#15094)

Backport #15085

There are a few recurrent issues with comment as diff reporting panics that are resistant to fixing due to the fact that the panic occurs in the template render and is swallowed by the template renderer.

This PR just adds some logging to force the panic to properly logged and re-propagates back up to the template renderer so we can actually detect what the issue is.

Signed-off-by: Andrew Thornton art27@cantab.net
3 years agoFix markdown rendering in milestone content (#15056) (#15091)
silverwind [Sun, 21 Mar 2021 17:57:06 +0000 (18:57 +0100)]
Fix markdown rendering in milestone content (#15056) (#15091)

- Add missing markdown class for rendered markdown.
- Increase font size of milestone name in list.

Fixes: https://github.com/go-gitea/gitea/issues/15046
3 years agoRemove possible resource leak (#15067) (#15082)
6543 [Sun, 21 Mar 2021 16:07:37 +0000 (17:07 +0100)]
Remove possible resource leak (#15067) (#15082)

* move "copy uploaded lfs files 2 repo" to own function for "defer file.Close()"

* rm type overload

Co-authored-by: zeripath <art27@cantab.net>
3 years agofix double 'push tag' action feed (#15078) (#15083)
a1012112796 [Sun, 21 Mar 2021 14:51:31 +0000 (22:51 +0800)]
fix double 'push tag' action feed (#15078) (#15083)

Signed-off-by: a1012112796 <1012112796@qq.com>
3 years agoHandle unauthorized user events gracefully (#15071) (#15074)
Lauris BH [Sun, 21 Mar 2021 10:21:28 +0000 (12:21 +0200)]
Handle unauthorized user events gracefully (#15071) (#15074)

3 years agoUpdate release date (#15065) v1.14.0-rc1
Lauris BH [Sat, 20 Mar 2021 13:29:01 +0000 (15:29 +0200)]
Update release date (#15065)

* Update release date

* Remove unneeded entry

3 years agoUpdate to goldmark 1.3.3 (#15059) (#15060)
zeripath [Sat, 20 Mar 2021 11:24:09 +0000 (11:24 +0000)]
Update to goldmark 1.3.3 (#15059) (#15060)

Backport #15059

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix bug when upload on web (#15042) (#15054)
6543 [Sat, 20 Mar 2021 01:37:57 +0000 (02:37 +0100)]
Fix bug when upload on web (#15042) (#15054)

* Fix bug when upload on web

* move into own function

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
3 years agoChangelog for 1.14.0-RC1 (#14935)
6543 [Fri, 19 Mar 2021 20:42:57 +0000 (21:42 +0100)]
Changelog for 1.14.0-RC1 (#14935)

* Changelog for 1.14.0-RC1

* api

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: zeripath <art27@cantab.net>
* Apply suggestions from code review

Co-authored-by: zeripath <art27@cantab.net>
* update

* Apply suggestions from code review

Co-authored-by: techknowlogick <matti@mdranta.net>
* Update CHANGELOG.md

Co-authored-by: techknowlogick <matti@mdranta.net>
* update

* Update CHANGELOG.md

* Apply suggestions from code review

Co-authored-by: zeripath <art27@cantab.net>
* Apply suggestions from code review

* Move things to SECURITY that are SECURITY

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update CHANGELOG.md

Co-authored-by: Lauris BH <lauris@nix.lv>
* Update CHANGELOG.md

* Apply suggestions from code review

Co-authored-by: Norwin <noerw@users.noreply.github.com>
* Update CHANGELOG.md

Co-authored-by: Kyle D. <kdumontnu@gmail.com>
* sort

* Update CHANGELOG.md

Co-authored-by: Kyle D. <kdumontnu@gmail.com>
* :gitea: :rocket:

* Update date

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Norwin <noerw@users.noreply.github.com>
Co-authored-by: Kyle D. <kdumontnu@gmail.com>