11955 Commits (968225e59c41295535800688bad5d7a13a68264c)
 

Author SHA1 Message Date
Patrick Schratz 968225e59c
update theme doc (#16860) 3 years ago
Lunny Xiao d985d4bc2f
Paginate releases page & set default page size to 10 (#16857)
* Add release default page and set it to 10

* use limit

Co-authored-by: 6543 <6543@obermui.de>
3 years ago
zeripath f5b0e2c9d2
Simplify split diff view generation and remove JS dependency (#16775)
Gitea has relied on some slow JS code to match up added and deleted lines on the
diff pages. This can cause a considerable slow down on large diff pages.

This PR makes a small change meaning that the matching up can occur much more simply.

Partial fix #1351

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago
wxiaoguang d24eb6e6ce
Add GoLand configuration in hacking on gitea (#16843)
Co-authored-by: zeripath <art27@cantab.net>
3 years ago
6543 7815f244d6
CI: rm unit-test-race step since its now coverd by unit-test too (#16856)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years ago
GiteaBot 5e71b9c200 [skip ci] Updated translations via Crowdin 3 years ago
zeripath c9c0475f4d
In Render tolerate not being passed a context (#16842)
* In Render tolerate not being passed a context

It is possible for RenderString to be passed to an external renderer if markdown
is set to be rendered by an external renderer. No context is currently sent to these
meaning that this will error out.

Fix #16835

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

* Add Context to Repo calls for RenderString

All calls from routers can easily add the context - so add it.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago
zeripath 90c0180447
Ensure that the default visibility is set on the user create page (#16845)
Set the default visibility on the user create page.

Fix #16840

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago
Kyle Evans cad70599a6
Refactor the fork service slightly to take ForkRepoOptions (#16744)
* Refactor the fork service slightly to take ForkRepoOptions

This reduces the number of places we need to change if we want to add other
options during fork time.

Signed-off-by: Kyle Evans <kevans@FreeBSD.org>

* Fix integrations and tests after ForkRepository refactor

Signed-off-by: Kyle Evans <kevans@FreeBSD.org>

* Update OldRepo -> BaseRepo

Signed-off-by: Kyle Evans <kevans@FreeBSD.org>

* gofmt pass

Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
3 years ago
zeripath 1904941382
Add test to ensure that dumping of login sources remains correct (#16847)
#16831 has occurred because of a missed regression. This PR adds a simple test to
try to prevent this occuring again.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago
KN4CK3R 88abb0dc8a
Decoupled code from DefaultSigningKey (#16743)
Decoupled code from `DefaultSigningKey`. Makes testing a little bit easier and is cleaner.
3 years ago
zeripath cd8db3a83d
Prevent "Race" detected in TestAdmin*User (#16830)
These tests are missing the defer prefix.

Related #1441

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago
zeripath e37342db0c
Add modals to Organization and Team remove/leave (#16471)
* Add modals to Organization and Team remove/leave

Add confirmation modals to Organization and Team remove and leave.

Fix #16215

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

* avoid for-in

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

* Revert "avoid for-in"

This reverts commit 2af9a6f9d46ed31b6fc6e3a29e695577dcf09f75.

* Apply suggestions from code review

Co-authored-by: silverwind <me@silverwind.io>

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years ago
GiteaBot 3289aceec2 [skip ci] Updated translations via Crowdin 3 years ago
Mura Li b60e814055
Enable race detector for CI (#1441)
* Enable race detector by default

Set RACE_ENABLED=0 to disable it when release

* Disable race detector for release builds

* use `true`

* fix

* debug issue

* fix

* verbose

* clean

* Fix wrong merge

* Fix coverage merge

Co-authored-by: Mura Li <typeless@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years ago
GiteaBot c446901a5d [skip ci] Updated translations via Crowdin 3 years ago
zeripath ba6baff696
Report the correct number of pushes on the feeds (#16811)
* Report the correct number of pushes on the feeds

Since the number of commits in the Action table has been limited to 5
the number of commits reported on the feeds page is now incorrectly also
limited to 5. The correct number is available as the Len and this PR
changes this to report this.

Fix #16804

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

* Update templates/user/dashboard/feeds.tmpl

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years ago
Aliaksandr Mianzhynski 28ac4a7a87
Add EdDSA JWT signing algorithm (#16786)
* Add EdDSA signing algorithm

* Fix typo

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years ago
Clar Fon 29b971b6d5
Actually compute proper foreground color for labels (#16729) 3 years ago
delvh 20efc6b56c
Unify migration descriptions (#16781)
* Unify migration descriptions

* Clarify that pure Git migration differs from other migrations

Co-authored-by: Norwin <noerw@users.noreply.github.com>

* Use Pull Requests for Gitea migration

Co-authored-by: Norwin <noerw@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
3 years ago
Lunny Xiao b88dbe1208
Use a common quote to instead of check database type (#16817)
`` ` `` will be converted to different database quote by xorm. So check database type is unnecessary.
3 years ago
zeripath 697213bdb3
Add primary_key to issue_index (#16813)
Make the group_id a primary key in issue_index. This already has an unique index
and therefore is a good candidate for becoming a primary key.

This PR also changes all other uses of this table to add the group_id as the
primary key.

Fix #16802

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago
zeripath e891d68dd7
Prevent NPE on empty commit (#16812) 3 years ago
Lunny Xiao 4e761fa385
Fix branch pagination error (#16805)
Fix #16801

Even if default branch is removed from the current page, but the total branches number should be still kept. So that the pagination calculation will be correct.
3 years ago
Lunny Xiao efaf109435
Add information for migrate failure (#16803)
Improve the reporting of errors when there is a migration failure
3 years ago
John Olheiser 648464b504
Add bundle download for repository (#14538)
* Add bundle download

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

* Fix fmt

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

* Fix build tags

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

* Download specific commit

Signed-off-by: jolheiser <john.olheiser@gmail.com>
3 years ago
GiteaBot d22cb600ed [skip ci] Updated translations via Crowdin 3 years ago
zeripath 921afb57fb
Add missing return to handleSettingRemoteAddrError (#16794)
There is a missing return in handleSettingRemoteAddrError which means
that the error page for repo settings is duplicately rendered.

Fix #16771

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

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years ago
zeripath 1cd4a3b963
Update caddyserver/certmagic (#16789)
Fixes issue with windows users & letsencrypt

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

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years ago
zeripath f31e7a67cf
Just use a slice when rendering file (#16774)
Highlight currently uses a map which is memory inefficient. Switch to use a slice instead.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago
zeripath 73defbbd1c
Ensure that template compilation panics are sent to the logs (#16788)
Although panics within the rendering pipeline are caught and dealt with,
panics that occur before that starts are unprotected and will kill Gitea
without being sent to the logs.

This PR adds a basic recovery handler to catch panics that occur after
the logger is initialised and ensure that they're sent to the logger.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago
GiteaBot 94f529af02 [skip ci] Updated translations via Crowdin 3 years ago
techknowlogick db1e3d02a5
frontport: 1.15.0 changelog (#16772)
* frontport: 1.15.0 changelog

* Update config.yaml
3 years ago
wxiaoguang b55c699c62
Alter issue/comment table TEXT fields to LONGTEXT (#16765)
* Alter issue/comment table TEXT fields to LONGTEXT

* Use If not Switch

Co-authored-by: zeripath <art27@cantab.net>
3 years ago
zeripath 7f85610942
Fix openidConnect source regression from #16544 (#16759)
Unfortunately there is bug in #16544 meaning that openid connects aren't
being matched properly as the capitalisation in that PR is incorrect.

This PR changes the capitalisation back to what is expected.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago
GiteaBot 208ae9e996 [skip ci] Updated licenses and gitignores 3 years ago
KN4CK3R cee5f7c5e2
Add migrate from OneDev (#16356)
* Use context to simplify logic.

* Added migration from OneDev.
This PR adds [OneDev](https://code.onedev.io/) as migration source.

Supported:
- [x] Milestones
- [x] Issues
- [x] Pull Requests
- [x] Comments
- [x] Reviews
- [x] Labels
3 years ago
wxiaoguang 2d1935acc7
Upgrade go.mod go version to 1.16 (#16764) 3 years ago
Abner 7844bf1430
Download lfs in git and web workflow from minio/s3 directly (#16731) 3 years ago
wxiaoguang 06f82641cb
when the update request doesn't intend to update attachments (eg: change checkbox state), ignore attachment updates (#16762) 3 years ago
KN4CK3R 0bd58d61e5
Added introspection endpoint. (#16752)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years ago
Steven e9747de952
Fix dependency link rendering in PR sidebar (#16754)
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
3 years ago
Steven 3ecc4a1b9e
Fix dependency translations (#16753)
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
3 years ago
KN4CK3R dc2613600c
Keep attachments on tasklist update (#16750)
* Send attachments too.

* Use tasklist flag.

* use action="ignoreAttachments" instead of "tasklist"

* Use boolean parameter.

Co-authored-by: zeripath <art27@cantab.net>
3 years ago
Elouan Martinet 3b2ed4762e
Do not use thin scrollbars on Firefox (#16738)
In #7269, thin scrollbars were added in Arc Green theme. It got moved
in base theme in #13361.

This PR removes the use of thin scrollbars which causes an
accessibility issue. The scrollbars become too thin to be dragged.

Signed-off-by: Elouan Martinet <exa@elou.world>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years ago
zeripath 03937891e2
Return nil proxy function if proxy not enabled (#16742)
Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago
KN4CK3R 4debb74eda
Fix wrong user in OpenID response (#16736)
* Fixed usage of wrong user.

* Added tests.
3 years ago
zeripath c9bca8c5e0
Recreate Tables should Recreate indexes on MySQL (#16718)
The MySQL indexes are not being renamed at the same time as RENAME table despite the
CASCADE. Therefore it is probably better to just recreate the indexes instead.

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

Co-authored-by: 6543 <6543@obermui.de>
3 years ago
n 4aa3cacc4f
Add edit button to wiki sidebar and footer (#16719)
* Add edit button to wiki sidebar and footer

* Make edit button transparent

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years ago
KN4CK3R 9f0c8f90af
Fix migration svg color (#16715)
* Fixed svg color.

* Use --color-text.

Co-authored-by: Lauris BH <lauris@nix.lv>
3 years ago