]> source.dussan.org Git - gitea.git/log
gitea.git
3 years agoreverse #15734 partial and comment (#15740)
6543 [Thu, 6 May 2021 04:05:54 +0000 (06:05 +0200)]
reverse #15734 partial and comment (#15740)

* reverse & comment

* Update templates/repo/graph/commits.tmpl

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
3 years agofix some ui bug about draft release (#15137)
a1012112796 [Thu, 6 May 2021 03:12:50 +0000 (11:12 +0800)]
fix some ui bug about draft release (#15137)

* fix some ui bug about draft release

- should not show draft release in tag list because
  it will't create real tag
- still show draft release without tag and commit message
  for draft release instead of 404 error
- remove tag load for attachement links because it's useless

Signed-off-by: a1012112796 <1012112796@qq.com>
* add test code

* fix test

That's because has added a new release in relaese test database.

* fix dropdown link for draft release

3 years agoDefer closing the gitrepo until the end of the wrapped context functions (#15653)
zeripath [Wed, 5 May 2021 23:30:25 +0000 (00:30 +0100)]
Defer closing the gitrepo until the end of the wrapped context functions (#15653)

There was a mistake in #15372 where deferral of gitrepo close occurs before it should.

This PR fixes this.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix close button change on delete in simplemde area (#15737)
zeripath [Wed, 5 May 2021 22:46:04 +0000 (23:46 +0100)]
Fix close button change on delete in simplemde area (#15737)

* Fix close button change on delete in simplemde area

Fix issue with close button changing when deleting in the simplemde textarea.

Signed-off-by: Andrew Thornton <art27@cantab.net>
* apply suggestion

Co-authored-by: 6543 <6543@obermui.de>
3 years agoAdd caret styling CSS (#15651)
silverwind [Wed, 5 May 2021 18:14:04 +0000 (20:14 +0200)]
Add caret styling CSS (#15651)

* Add caret styling CSS

Fixes: https://github.com/go-gitea/gitea/issues/15644
* add rule in arc-green as well

* grammar

* Update web_src/less/themes/theme-arc-green.less

Co-authored-by: Wim <wim@42.be>
* remove extra rule

* add comment

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Wim <wim@42.be>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoIssue list alignment tweaks (#15483)
silverwind [Wed, 5 May 2021 16:57:59 +0000 (18:57 +0200)]
Issue list alignment tweaks (#15483)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
3 years agoCommit Graph: Pull-Requests should not link to issues (#15734)
KN4CK3R [Wed, 5 May 2021 15:57:39 +0000 (17:57 +0200)]
Commit Graph: Pull-Requests should not link to issues (#15734)

Use `/pulls` and simplify code.

3 years agoFix broken avatars since #15301 (#15731)
zeripath [Wed, 5 May 2021 13:06:39 +0000 (14:06 +0100)]
Fix broken avatars since #15301 (#15731)

There was a missing * from the avatars routes in #15301.

Fix #15727

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoMySQL 5 FAQ (#15729)
John Olheiser [Wed, 5 May 2021 04:39:09 +0000 (23:39 -0500)]
MySQL 5 FAQ (#15729)

* MySQL 5

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Wording

3 years agoUse route rather than use thus reducing the number of stack frames (#15301)
zeripath [Tue, 4 May 2021 21:48:31 +0000 (22:48 +0100)]
Use route rather than use thus reducing the number of stack frames (#15301)

Since the move to Chi the number of stack frames has proliferated somewhat catastrophically and we're up to 96 frames with multiple tests of the url outside of a trie which is inefficient.

This PR reduces the number of stack frames by 6 through careful use of Route, moves Captcha into its own router so that it only fires on Captcha routes, similarly for avatars and repo-avatars.

The robots.txt, / and apple-touch-icon.png are moved out of requiring Contexter.

It moves access logger higher in the stack frame because there is no reason why it can't be higher.

Extract from #15186
Contains #15292

3 years agoupdate branch in CI and docs (#15631)
techknowlogick [Tue, 4 May 2021 16:16:23 +0000 (12:16 -0400)]
update branch in CI and docs (#15631)

3 years agoFix webkit calendar icon color on arc-green (#15713)
silverwind [Tue, 4 May 2021 13:56:43 +0000 (15:56 +0200)]
Fix webkit calendar icon color on arc-green (#15713)

Co-authored-by: zeripath <art27@cantab.net>
3 years agoDisplay specific message if diff is not displayed because of too long line (#15611)
Loutro [Tue, 4 May 2021 12:58:49 +0000 (14:58 +0200)]
Display specific message if diff is not displayed because of too long line  (#15611)

* 7184-  message if line too long

* Update options/locale/locale_en-US.ini

Co-authored-by: silverwind <me@silverwind.io>
* add flag on missing cases

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Andrew Thornton <art27@cantab.net>
3 years agoOnly log Error on getLastCommitStatus error to let pull list still be visible (#15716)
6543 [Tue, 4 May 2021 12:03:02 +0000 (14:03 +0200)]
Only log Error on getLastCommitStatus error to let pull list still be visible (#15716)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 4 May 2021 00:12:31 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoAdd compare tag dropdown to releases page (#15695)
Jonathan Tran [Mon, 3 May 2021 17:27:48 +0000 (13:27 -0400)]
Add compare tag dropdown to releases page (#15695)

* Add compare tag dropdown to releases page

* Change defaults to be more intuitive and remove unneeded option

* Fix to select branch on releases page

Co-authored-by: Jonathan Tran <jon@allspice.io>
Co-authored-by: Kyle D <kdumontnu@gmail.com>
3 years agoFix setting redis db path (#15698)
zeripath [Mon, 3 May 2021 17:24:24 +0000 (18:24 +0100)]
Fix setting redis db path (#15698)

There is a bug setting the redis db in the common nosql manager whereby the db path
always fails.

This PR fixes this.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoPrevent race in TestChannelQueue_Batch (#15703)
zeripath [Mon, 3 May 2021 16:16:59 +0000 (17:16 +0100)]
Prevent race in TestChannelQueue_Batch (#15703)

There is a potential race in TestChannelQueue_Batch due to boost workers starting up

This PR simply removes the boosts from this test.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoImprove Light Chroma style (#15699)
mlpo [Mon, 3 May 2021 02:43:08 +0000 (04:43 +0200)]
Improve Light Chroma style (#15699)

* Improve Light Chroma style

* Light Chroma style: avoid close colors

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 3 May 2021 00:12:17 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoAddition to (Add Location, Website and Description to API #15675) (#15690)
KN4CK3R [Sun, 2 May 2021 19:03:15 +0000 (21:03 +0200)]
Addition to  (Add Location, Website and Description to API #15675) (#15690)

* Use same name as other structs.

* Sync with normal forms.

* Edit description with API.

* Workaround for nil value.

3 years agoOnly use boost workers for leveldb shadow queues (#15696)
zeripath [Sun, 2 May 2021 07:22:30 +0000 (08:22 +0100)]
Only use boost workers for leveldb shadow queues (#15696)

* The leveldb shadow queue of a persistable channel queue should always start with 0
workers and just use boost to add additional workers if necessary.

* create a zero boost so that if there are no workers in a pool - boost to start the workers

* actually set timeout appropriately on boosted workers

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix DB session cleanup (#15697)
zeripath [Sun, 2 May 2021 02:51:03 +0000 (03:51 +0100)]
Fix DB session cleanup (#15697)

The DB session clean up needs to check expiry not created_unix.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoPerformance improvement for last commit cache and show-ref (#15455)
zeripath [Sun, 2 May 2021 01:16:08 +0000 (02:16 +0100)]
Performance improvement for last commit cache and show-ref (#15455)

* Improve performance when there are multiple commits in the last commit cache

* read refs directly if we can

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoMove tooltip down to allow selection of Remove File on error (#15672)
Kyle D [Sat, 1 May 2021 21:33:21 +0000 (15:33 -0600)]
Move tooltip down to allow selection of Remove File on error (#15672)

3 years agoMarkdown CSS tweaks (#15572)
silverwind [Sat, 1 May 2021 21:32:43 +0000 (23:32 +0200)]
Markdown CSS tweaks (#15572)

Update Markdown CSS to more closely match GH rendering. Changes include
better nested list margins and tweaked font sizes.

Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoadd cron job to delete old actions from database (#15688)
a1012112796 [Sat, 1 May 2021 12:17:02 +0000 (20:17 +0800)]
add cron job to delete old actions from database (#15688)

that's a way to save database storage space.

Signed-off-by: a1012112796 <1012112796@qq.com>
3 years agoUnify integration test configs. (#15650)
KN4CK3R [Sat, 1 May 2021 09:54:55 +0000 (11:54 +0200)]
Unify integration test configs. (#15650)

3 years agoAdd Location, Website and Biography to API (#15675)
KN4CK3R [Sat, 1 May 2021 09:05:55 +0000 (11:05 +0200)]
Add Location, Website and Biography to API (#15675)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 1 May 2021 00:12:19 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoFixed several activation bugs (#15473)
KN4CK3R [Fri, 30 Apr 2021 20:21:33 +0000 (22:21 +0200)]
Fixed several activation bugs (#15473)

* Removed unneeded form tag.

* Fixed typo.

* Fixed NPE.

* Use better error page.

* Splitted GET and POST.

3 years agoDelete references if repository gets deleted (#15681)
KN4CK3R [Fri, 30 Apr 2021 19:10:39 +0000 (21:10 +0200)]
Delete references if repository gets deleted (#15681)

* Remove DeletedBranch and LFSLocks.

* Sort beans.

Co-authored-by: zeripath <art27@cantab.net>
3 years agoFix orphaned objects deletion bug (#15657)
Lunny Xiao [Fri, 30 Apr 2021 18:08:46 +0000 (02:08 +0800)]
Fix orphaned objects deletion bug (#15657)

* Fix orphaned objects deletion bug

* extend test

Co-authored-by: 6543 <6543@obermui.de>
3 years agoUnified link creation. (#15619)
KN4CK3R [Fri, 30 Apr 2021 17:25:13 +0000 (19:25 +0200)]
Unified link creation. (#15619)

3 years agoAdded missing prefix on install route. (#15677)
KN4CK3R [Fri, 30 Apr 2021 15:59:16 +0000 (17:59 +0200)]
Added missing prefix on install route. (#15677)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoDocs: fix location for custom/options/license (#15671)
yearski [Fri, 30 Apr 2021 14:36:28 +0000 (08:36 -0600)]
Docs: fix location for custom/options/license (#15671)

3 years agoDocs: renderers rst: rst2html.py -> pandoc (#15659)
6543 [Fri, 30 Apr 2021 06:50:55 +0000 (08:50 +0200)]
Docs: renderers rst: rst2html.py -> pandoc (#15659)

3 years agoDelete protected branch if repository gets removed (#15658)
KN4CK3R [Thu, 29 Apr 2021 22:48:52 +0000 (00:48 +0200)]
Delete protected branch if repository gets removed (#15658)

* Added missing error parameters.

* Delete protected branch if repository gets removed.

* Added doctor fix.

3 years agoRemove random password in Dockerfiles (#15362)
Martin Michaelis [Thu, 29 Apr 2021 17:48:52 +0000 (19:48 +0200)]
Remove random password in Dockerfiles (#15362)

* Remove random password of git user in dockerfile

* Disable git user account in rootless dockerfile

3 years agofix(settings): misaligned buttons (#15656)
Garrit Franke [Thu, 29 Apr 2021 17:05:07 +0000 (19:05 +0200)]
fix(settings): misaligned buttons (#15656)

Co-authored-by: 6543 <6543@obermui.de>
3 years agoFix readme render bug (#15649)
Lunny Xiao [Wed, 28 Apr 2021 20:22:54 +0000 (04:22 +0800)]
Fix readme render bug (#15649)

3 years agoRemove spurious set name from eventsource.sharedworker.js (#15643)
zeripath [Wed, 28 Apr 2021 14:40:04 +0000 (15:40 +0100)]
Remove spurious set name from eventsource.sharedworker.js (#15643)

Fix #15617

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoadd `/assets` as root dir of public files (#15219)
a1012112796 [Wed, 28 Apr 2021 12:35:06 +0000 (20:35 +0800)]
add `/assets` as root dir of public files (#15219)

* add `/assets` as root dir of public files

Signed-off-by: a1012112796 <1012112796@qq.com>
* move serviceworker.js

* make fmt

* fix some link

* fix test

* Apply suggestions from code review

Co-authored-by: silverwind <me@silverwind.io>
* Apply suggestions from code review

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
3 years agoRemove x-ua-compatible header (#15640)
silverwind [Wed, 28 Apr 2021 00:15:16 +0000 (02:15 +0200)]
Remove x-ua-compatible header (#15640)

The header is deprecated since IE 11 so it only serves to support IE 10
and below which are browsers which are long unsupported now.

3 years agonot update updated uinx for `git gc` (#15637)
a1012112796 [Tue, 27 Apr 2021 16:33:16 +0000 (00:33 +0800)]
not update updated uinx for `git gc` (#15637)

fix #15634

Signed-off-by: a1012112796 <1012112796@qq.com>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 27 Apr 2021 00:12:19 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoFix commit graph author link (#15627)
zeripath [Mon, 26 Apr 2021 18:02:15 +0000 (19:02 +0100)]
Fix commit graph author link (#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)
Lunny Xiao [Sun, 25 Apr 2021 18:48:12 +0000 (02:48 +0800)]
fix webhook timeout bug (#15613)

* Also fix the potential problem in httplib

3 years agoUpdate config-cheat-sheet.en-us.md (#15606)
Dong Nguyen [Sat, 24 Apr 2021 14:58:40 +0000 (21:58 +0700)]
Update config-cheat-sheet.en-us.md (#15606)

Add more guide about `PROVIDER_CONFIG` when `PROVIDER` is `db` (https://github.com/go-gitea/gitea/issues/14016)

3 years agoUpdate JS dependencies (#15591)
silverwind [Sat, 24 Apr 2021 10:07:22 +0000 (12:07 +0200)]
Update JS dependencies (#15591)

* Update JS dependencies

- Update all JS dependencies
- Regenerate SVGs
- Remove unused postcss dependency
- Remove removed webpack option

* re-add postcss

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoResolve panic on failed interface conversion in migration v156 (#15604)
techknowlogick [Sat, 24 Apr 2021 03:14:39 +0000 (23:14 -0400)]
Resolve panic on failed interface conversion in migration v156 (#15604)

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>
3 years agoAttachment support repository route (#15580)
Lunny Xiao [Fri, 23 Apr 2021 15:18:21 +0000 (23:18 +0800)]
Attachment support repository route (#15580)

3 years agoFix go-fuzz (#15596)
6543 [Fri, 23 Apr 2021 08:22:52 +0000 (10:22 +0200)]
Fix go-fuzz (#15596)

* Fix go-fuzz

followup of https://github.com/go-gitea/gitea/pull/15175

* simplify

* enhance

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 23 Apr 2021 00:12:28 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years ago[Vendor] Update directly used dependencys (#15593)
6543 [Fri, 23 Apr 2021 00:08:53 +0000 (02:08 +0200)]
[Vendor] Update directly used dependencys (#15593)

* update github.com/blevesearch/bleve v2.0.2 -> v2.0.3

* github.com/denisenkom/go-mssqldb v0.9.0 -> v0.10.0

* github.com/editorconfig/editorconfig-core-go v2.4.1 -> v2.4.2

* github.com/go-chi/cors v1.1.1 -> v1.2.0

* github.com/go-git/go-billy v5.0.0 -> v5.1.0

* github.com/go-git/go-git v5.2.0 -> v5.3.0

* github.com/go-ldap/ldap v3.2.4 -> v3.3.0

* github.com/go-redis/redis v8.6.0 -> v8.8.2

* github.com/go-sql-driver/mysql v1.5.0 -> v1.6.0

* github.com/go-swagger/go-swagger v0.26.1 -> v0.27.0

* github.com/lib/pq v1.9.0 -> v1.10.1

* github.com/mattn/go-sqlite3 v1.14.6 -> v1.14.7

* github.com/go-testfixtures/testfixtures v3.5.0 -> v3.6.0

* github.com/issue9/identicon v1.0.1 -> v1.2.0

* github.com/klauspost/compress v1.11.8 -> v1.12.1

* github.com/mgechev/revive v1.0.3 -> v1.0.6

* github.com/microcosm-cc/bluemonday v1.0.7 -> v1.0.8

* github.com/niklasfasching/go-org v1.4.0 -> v1.5.0

* github.com/olivere/elastic v7.0.22 -> v7.0.24

* github.com/pelletier/go-toml v1.8.1 -> v1.9.0

* github.com/prometheus/client_golang v1.9.0 -> v1.10.0

* github.com/xanzy/go-gitlab v0.44.0 -> v0.48.0

* github.com/yuin/goldmark v1.3.3 -> v1.3.5

* github.com/6543/go-version v1.2.4 -> v1.3.1

* do github.com/lib/pq v1.10.0 -> v1.10.1 again ...

3 years agoRaw file view tweaks (#15520)
silverwind [Thu, 22 Apr 2021 21:43:44 +0000 (23:43 +0200)]
Raw file view tweaks (#15520)

- Limit SVG images to 600px width
- Adjust size of view toggle buttons to match other buttons
- Make Edit/Delete buttons easier to click

Had to create a separate CSS file because the less parser can not parse
CSS4 case-insensitive attribute selectors which are widely supported by
browsers.

Fixes: https://github.com/go-gitea/gitea/issues/15515
3 years ago[Vendor] update certmagic (#15590)
6543 [Thu, 22 Apr 2021 20:42:33 +0000 (22:42 +0200)]
[Vendor] update certmagic (#15590)

* update github.com/caddyserver/certmagic v0.12.0 -> v0.13.0

* migrate

3 years agoFix missing storage init (#15589)
Lunny Xiao [Thu, 22 Apr 2021 16:48:47 +0000 (00:48 +0800)]
Fix missing storage init (#15589)

3 years agoIf the default branch is not present do not report error on stats indexing (follow...
zeripath [Thu, 22 Apr 2021 15:35:29 +0000 (16:35 +0100)]
If the default branch is not present do not report error on stats indexing (follow-up of #15546) (#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 docker enviroment variable from TYPE to DB_TYPE (#15585)
Björn Heinrichs [Thu, 22 Apr 2021 14:34:12 +0000 (16:34 +0200)]
Fix docker enviroment variable from TYPE to DB_TYPE (#15585)

As documented in https://docs.gitea.io/en-us/config-cheat-sheet/ the database type is defined using db_type not type.

3 years agoBump unrolled/render to v1.1.0 (#15581)
Nathan Smith [Thu, 22 Apr 2021 09:54:27 +0000 (02:54 -0700)]
Bump unrolled/render to v1.1.0 (#15581)

v1.1.0 has improved buffer pooling

3 years agoIf the default branch is not present do not report error on stats indexing (#15546)
zeripath [Thu, 22 Apr 2021 01:19:21 +0000 (02:19 +0100)]
If the default branch is not present do not report error on stats indexing (#15546)

* If the default branch is not present do not report error on stats indexing

Fix #15257

Signed-off-by: Andrew Thornton <art27@cantab.net>
* as per lunny

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoAdd placeholder text to deploy key textarea (#15575)
zeripath [Wed, 21 Apr 2021 20:19:32 +0000 (21:19 +0100)]
Add placeholder text to deploy key textarea (#15575)

* Add placeholder text to deploy key textarea

Related #15574

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update templates/repo/settings/deploy_keys.tmpl

* Update templates/repo/settings/deploy_keys.tmpl

3 years agoFix NPE on view commit with notes (#15561)
zeripath [Wed, 21 Apr 2021 18:00:27 +0000 (19:00 +0100)]
Fix NPE on view commit with notes (#15561)

Fix #15558

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix lfs management find (#15537)
Lunny Xiao [Wed, 21 Apr 2021 16:31:59 +0000 (00:31 +0800)]
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>
3 years agoOutput node min version variable (#15562)
Kyle D [Wed, 21 Apr 2021 06:15:18 +0000 (02:15 -0400)]
Output node min version variable (#15562)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 21 Apr 2021 00:12:23 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoProject board improvements (#15429)
silverwind [Tue, 20 Apr 2021 04:13:03 +0000 (06:13 +0200)]
Project board improvements (#15429)

* 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>
3 years agoAdded OpenAPI document link to usage (#15535)
Nathan Zook [Tue, 20 Apr 2021 03:29:08 +0000 (20:29 -0700)]
Added OpenAPI document link to usage (#15535)

* Added OpenAPI document link to usage

The OpenAPI document at /api/swagger.v1.json needs an obvious reference.  Sadly, I am English monolingual, so someone else is going to have to do the other languages.  In the mean time, this PR should help anyone looking for the file.

* Update docs/content/doc/developers/api-usage.en-us.md

Co-authored-by: a1012112796 <1012112796@qq.com>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: a1012112796 <1012112796@qq.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 20 Apr 2021 00:12:27 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoRefactor renders (#15175)
Lunny Xiao [Mon, 19 Apr 2021 22:25:08 +0000 (06:25 +0800)]
Refactor renders (#15175)

* Refactor renders

* Some performance optimization

* Fix comment

* Transform reader

* Fix csv test

* Fix test

* Fix tests

* Improve optimaziation

* Fix test

* Fix test

* Detect file encoding with reader

* Improve optimaziation

* reduce memory usage

* improve code

* fix build

* Fix test

* Fix for go1.15

* Fix render

* Fix comment

* Fix lint

* Fix test

* Don't use NormalEOF when unnecessary

* revert change on util.go

* Apply suggestions from code review

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

* Take NormalEOF back

Co-authored-by: zeripath <art27@cantab.net>
3 years agoFix a broken link in customizing-gitea.en-us.md (#15543)
Raphael Kruse [Mon, 19 Apr 2021 15:47:49 +0000 (17:47 +0200)]
Fix a broken link in customizing-gitea.en-us.md (#15543)

3 years agoChange the chinese discuss link to discourse (#15533)
Lunny Xiao [Sun, 18 Apr 2021 11:12:16 +0000 (19:12 +0800)]
Change the chinese discuss link to discourse (#15533)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 18 Apr 2021 00:12:19 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoFix bug on commit graph (#15517)
Lunny Xiao [Sat, 17 Apr 2021 09:27:25 +0000 (17:27 +0800)]
Fix bug on commit graph (#15517)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 17 Apr 2021 00:12:20 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoPrevent migration 156 failure if tag commit missing (#15519)
zeripath [Fri, 16 Apr 2021 23:28:40 +0000 (00:28 +0100)]
Prevent migration 156 failure if tag commit missing (#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>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoSend size to /avatars if requested (#15459)
zeripath [Fri, 16 Apr 2021 22:22:25 +0000 (23:22 +0100)]
Send size to /avatars if requested (#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>
3 years agoAdd tests for clone from wiki (#15513)
Lunny Xiao [Fri, 16 Apr 2021 21:39:21 +0000 (05:39 +0800)]
Add tests for clone from wiki (#15513)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoFix Benchmark tests, remove a broken one & add two new (#15250)
6543 [Fri, 16 Apr 2021 18:30:16 +0000 (20:30 +0200)]
Fix Benchmark tests, remove a broken one & add two new  (#15250)

* Benchmark Integration TESTS

* CI: add benching-arm64 pipeline

* BenchmarkRepo: name test case tests

* Fix BenchmarkRepoBranchCommit beside Create new Branch

* CI: benching use amd64

* rm total broken "BenchmarkRepo"

* dont run benchmark in CI

3 years agofrontport: 1.14.1 changelog (#15503)
techknowlogick [Fri, 16 Apr 2021 04:06:02 +0000 (00:06 -0400)]
frontport: 1.14.1 changelog (#15503)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoadd well-known config for OIDC (#15355)
techknowlogick [Fri, 16 Apr 2021 02:32:00 +0000 (22:32 -0400)]
add well-known config for OIDC (#15355)

* add well-known config for OIDC

* spacing per feedback

* Update oidc_wellknown.tmpl

* add id_token

* Update oidc_wellknown.tmpl

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoFix missing icons and colorpicker when mounted on suburl (#15501)
zeripath [Thu, 15 Apr 2021 22:15:51 +0000 (23:15 +0100)]
Fix missing icons and colorpicker when mounted on suburl (#15501)

* Fix missing icons and colorpicker when mounted on suburl

Signed-off-by: Andrew Thornton <art27@cantab.net>
* as per silverwind

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoFix: npx webpack make: *** [Makefile:699: public/js/index.js] Error -… (#15465)
Kindyroo [Thu, 15 Apr 2021 20:07:31 +0000 (04:07 +0800)]
Fix: npx webpack make: *** [Makefile:699: public/js/index.js] Error -… (#15465)

* Fix: npx webpack make: *** [Makefile:699: public/js/index.js] Error -1073741819

* Update webpack.config.js

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: silverwind <me@silverwind.io>
3 years agoFix bug clone wiki (#15499)
Lunny Xiao [Thu, 15 Apr 2021 18:57:19 +0000 (02:57 +0800)]
Fix bug clone wiki (#15499)

Fix #15494

Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoPerformance improvement for list pull requests (#15447)
Lunny Xiao [Thu, 15 Apr 2021 17:34:43 +0000 (01:34 +0800)]
Performance improvement for list pull requests (#15447)

3 years agoDisable Stars config option (#14653)
Kyle D [Thu, 15 Apr 2021 16:53:57 +0000 (10:53 -0600)]
Disable Stars config option (#14653)

* Add config option to disable stars

* Replace "stars" with watched in user profile

* Add documentation

3 years agoSpecify relation between multiple signing options (#15496)
firesoft-de [Thu, 15 Apr 2021 16:06:32 +0000 (18:06 +0200)]
Specify relation between multiple signing options (#15496)

3 years agomigration: github: if rate limit is not enabled, ignore it (#15490)
6543 [Thu, 15 Apr 2021 13:34:22 +0000 (15:34 +0200)]
migration: github: if rate limit is not enabled, ignore it (#15490)

3 years agoQuery the DB for the hash before inserting in to email_hash (#15457)
zeripath [Thu, 15 Apr 2021 12:22:04 +0000 (13:22 +0100)]
Query the DB for the hash before inserting in to email_hash (#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>
3 years agoMake build scripts compatible with node 12 (#15479)
silverwind [Thu, 15 Apr 2021 11:02:34 +0000 (13:02 +0200)]
Make build scripts compatible with node 12 (#15479)

* Make build scripts compatible with node 12

"fs/promises" is not in node 12, use a more compatible way to import it.
Also, lock major down versions of the image build dependencies to
prevent future surprises.

* add node_modules dependency

3 years agoEnsure review dismissal only dismisses the correct review (#15477)
zeripath [Thu, 15 Apr 2021 10:03:11 +0000 (11:03 +0100)]
Ensure review dismissal only dismisses the correct review (#15477)

Fix #15472

Signed-off-by: Andrew Thornton art27@cantab.net
3 years agoBuild go-git variants for windows (#15482)
zeripath [Thu, 15 Apr 2021 09:02:44 +0000 (10:02 +0100)]
Build go-git variants for windows (#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>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoFix potential copy lfs records failure when fork a repository (#15441)
Lunny Xiao [Wed, 14 Apr 2021 21:15:28 +0000 (05:15 +0800)]
Fix potential copy lfs records failure when fork a repository (#15441)

3 years agoUse subdir for URL (#15446)
KN4CK3R [Wed, 14 Apr 2021 19:43:17 +0000 (21:43 +0200)]
Use subdir for URL (#15446)

Fixes #15444

3 years agoUse index of the supported tags to choose user lang (#15452)
Naohisa Murakami [Wed, 14 Apr 2021 18:52:01 +0000 (03:52 +0900)]
Use index of the supported tags to choose user lang (#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.

3 years agoquick fix (#15464)
John Olheiser [Wed, 14 Apr 2021 17:54:54 +0000 (12:54 -0500)]
quick fix (#15464)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
3 years agoFixed several typos. (#15470)
KN4CK3R [Wed, 14 Apr 2021 16:44:01 +0000 (18:44 +0200)]
Fixed several typos. (#15470)

3 years agofix wrong file link in code search page (#15466)
a1012112796 [Wed, 14 Apr 2021 15:59:42 +0000 (23:59 +0800)]
fix wrong file link in code search page (#15466)

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>
3 years agoFix ambiguous argument error on tags (#15432)
zeripath [Wed, 14 Apr 2021 14:22:37 +0000 (15:22 +0100)]
Fix ambiguous argument error on tags (#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>