Commit Graph

11374 Commits (ea40eb749b9f7f238fc9bb60c4a9d455c62b75ca)
 

Author SHA1 Message Date
techknowlogick ea40eb749b
Resolve panic on failed interface conversion in migration v156 ()
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>
Lunny Xiao 1b3dbdba4e
Attachment support repository route ()
6543 bee8ce342f
Fix go-fuzz ()
* Fix go-fuzz

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

* simplify

* enhance
GiteaBot e91932bc15 [skip ci] Updated translations via Crowdin
6543 792b4dba2c
[Vendor] Update directly used dependencys ()
* 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 ...
silverwind 834fc74873
Raw file view tweaks ()
- 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
6543 8ea1d32bea
[Vendor] update certmagic ()
* update github.com/caddyserver/certmagic v0.12.0 -> v0.13.0

* migrate
Lunny Xiao e7fc078891
Fix missing storage init ()
zeripath d6a33cef23
If the default branch is not present do not report error on stats indexing (follow-up of ) ()
 doesn't completely fix this problem because the error returned is an ObjectNotExist
error not a BranchNotExist error.

Add test for ErrObjectNotExist too

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
Björn Heinrichs 72e0ad8000
Fix docker enviroment variable from TYPE to DB_TYPE ()
As documented in https://docs.gitea.io/en-us/config-cheat-sheet/ the database type is defined using db_type not type.
Nathan Smith 445e47b692
Bump unrolled/render to v1.1.0 ()
v1.1.0 has improved buffer pooling
zeripath f719ffc783
If the default branch is not present do not report error on stats indexing ()
* If the default branch is not present do not report error on stats indexing

Fix 

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>
zeripath df416f2414
Add placeholder text to deploy key textarea ()
* Add placeholder text to deploy key textarea

Related 

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

* Update templates/repo/settings/deploy_keys.tmpl

* Update templates/repo/settings/deploy_keys.tmpl
zeripath 1cd8d0ca0e
Fix NPE on view commit with notes ()
Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
Lunny Xiao 2255afffad
Fix lfs management find ()
Fix 

* 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>
Kyle D 9b8ffa1c7a
Output node min version variable ()
GiteaBot d85a4e8cec [skip ci] Updated translations via Crowdin
silverwind 5e85cdad29
Project board improvements ()
* 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>
Nathan Zook 2242f381e6
Added OpenAPI document link to usage ()
* 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>
GiteaBot 3a49c00f0d [skip ci] Updated translations via Crowdin
Lunny Xiao 9d99f6ab19
Refactor renders ()
* 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>
Raphael Kruse c9cc6698d2
Fix a broken link in customizing-gitea.en-us.md ()
Lunny Xiao ce8255fb7b
Change the chinese discuss link to discourse ()
GiteaBot 7417628f8d [skip ci] Updated translations via Crowdin
Lunny Xiao a3c4c57b7c
Fix bug on commit graph ()
GiteaBot eee30d5586 [skip ci] Updated translations via Crowdin
zeripath b1e138511b
Prevent migration 156 failure if tag commit missing ()
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>
zeripath 324cff68c9
Send size to /avatars if requested ()
If an avatar is requested in a particular size ensure that /avatars also gets the size request

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
Lunny Xiao c29620c05f
Add tests for clone from wiki ()
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
6543 a67861b4dc
Fix Benchmark tests, remove a broken one & add two new ()
* 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
techknowlogick c29e85228f
frontport: 1.14.1 changelog ()
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
techknowlogick 024ef3940f
add well-known config for OIDC ()
* 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>
zeripath 6a7090b41d
Fix missing icons and colorpicker when mounted on suburl ()
* 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>
Kindyroo 953f39822b
Fix: npx webpack make: *** [Makefile:699: public/js/index.js] Error -… ()
* 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>
Lunny Xiao 92c09a90f7
Fix bug clone wiki ()
Fix 

Co-authored-by: Lauris BH <lauris@nix.lv>
Lunny Xiao 8202dd1311
Performance improvement for list pull requests ()
Kyle D f44543a1bb
Disable Stars config option ()
* Add config option to disable stars

* Replace "stars" with watched in user profile

* Add documentation
firesoft-de af2adb4e35
Specify relation between multiple signing options ()
6543 2a42d80d14
migration: github: if rate limit is not enabled, ignore it ()
zeripath 217b5c150f
Query the DB for the hash before inserting in to email_hash ()
Some postgres users have logging which logs even failed transactions. So
just query the db before trying to insert.

Fix 

Signed-off-by: Andrew Thornton art27@cantab.net
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
silverwind f7830041f4
Make build scripts compatible with node 12 ()
* 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
zeripath 9d07facdeb
Ensure review dismissal only dismisses the correct review ()
Fix 

Signed-off-by: Andrew Thornton art27@cantab.net
zeripath 61bae620c1
Build go-git variants for windows ()
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>
Lunny Xiao dc5a1d617d
Fix potential copy lfs records failure when fork a repository ()
KN4CK3R cf8f66e5dc
Use subdir for URL ()
Fixes 
Naohisa Murakami 1426601cf7
Use index of the supported tags to choose user lang ()
Fix .

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.
John Olheiser 078df7a392
quick fix ()
Signed-off-by: jolheiser <john.olheiser@gmail.com>
KN4CK3R 662bbed32e
Fixed several typos. ()
a1012112796 08ba895c2b
fix wrong file link in code search page ()
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 

Signed-off-by: a1012112796 <1012112796@qq.com>

Co-authored-by: 6543 <6543@obermui.de>
zeripath 1ee776970a
Fix ambiguous argument error on tags ()
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>