aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* CI: rm unit-test-race step since its now coverd by unit-test too (#16856)65432021-08-291-11/+0
| | | Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-08-294-0/+28
|
* In Render tolerate not being passed a context (#16842)zeripath2021-08-287-1/+20
| | | | | | | | | | | | | | | | | | | * 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>
* Ensure that the default visibility is set on the user create page (#16845)zeripath2021-08-281-1/+1
| | | | | | | | Set the default visibility on the user create page. Fix #16840 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Refactor the fork service slightly to take ForkRepoOptions (#16744)Kyle Evans2021-08-287-23/+46
| | | | | | | | | | | | | | | | | | | | * 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>
* Add test to ensure that dumping of login sources remains correct (#16847)zeripath2021-08-281-0/+46
| | | | | | | | #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>
* Decoupled code from DefaultSigningKey (#16743)KN4CK3R2021-08-274-27/+27
| | | Decoupled code from `DefaultSigningKey`. Makes testing a little bit easier and is cleaner.
* Prevent "Race" detected in TestAdmin*User (#16830)zeripath2021-08-271-3/+3
| | | | | | | These tests are missing the defer prefix. Related #1441 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add modals to Organization and Team remove/leave (#16471)zeripath2021-08-2619-40/+157
| | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* [skip ci] Updated translations via CrowdinGiteaBot2021-08-2716-193/+284
|
* Enable race detector for CI (#1441)Mura Li2021-08-263-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* [skip ci] Updated translations via CrowdinGiteaBot2021-08-262-0/+2
|
* Report the correct number of pushes on the feeds (#16811)zeripath2021-08-253-2/+15
| | | | | | | | | | | | | | | | * 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>
* Add EdDSA JWT signing algorithm (#16786)Aliaksandr Mianzhynski2021-08-254-9/+76
| | | | | | | | * Add EdDSA signing algorithm * Fix typo Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Actually compute proper foreground color for labels (#16729)Clar Fon2021-08-252-12/+53
|
* Unify migration descriptions (#16781)delvh2021-08-252-7/+7
| | | | | | | | | | | | * 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>
* Use a common quote to instead of check database type (#16817)Lunny Xiao2021-08-251-8/+1
| | | `` ` `` will be converted to different database quote by xorm. So check database type is unnecessary.
* Add primary_key to issue_index (#16813)zeripath2021-08-255-5/+25
| | | | | | | | | | | | 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>
* Prevent NPE on empty commit (#16812)zeripath2021-08-241-0/+3
|
* Fix branch pagination error (#16805)Lunny Xiao2021-08-241-1/+1
| | | | | 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.
* Add information for migrate failure (#16803)Lunny Xiao2021-08-241-1/+1
| | | Improve the reporting of errors when there is a migration failure
* Add bundle download for repository (#14538)John Olheiser2021-08-2483-41/+167
| | | | | | | | | | | | | | | | | * 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>
* [skip ci] Updated translations via CrowdinGiteaBot2021-08-245-2/+7
|
* Add missing return to handleSettingRemoteAddrError (#16794)zeripath2021-08-231-0/+1
| | | | | | | | | | 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>
* Update caddyserver/certmagic (#16789)zeripath2021-08-23109-3564/+4543
| | | | | | | Fixes issue with windows users & letsencrypt Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Just use a slice when rendering file (#16774)zeripath2021-08-233-42/+41
| | | | | | Highlight currently uses a map which is memory inefficient. Switch to use a slice instead. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Ensure that template compilation panics are sent to the logs (#16788)zeripath2021-08-231-0/+5
| | | | | | | | | | 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>
* [skip ci] Updated translations via CrowdinGiteaBot2021-08-2320-39/+26
|
* frontport: 1.15.0 changelog (#16772)techknowlogick2021-08-222-48/+46
| | | | | * frontport: 1.15.0 changelog * Update config.yaml
* Alter issue/comment table TEXT fields to LONGTEXT (#16765)wxiaoguang2021-08-224-3/+34
| | | | | | | * Alter issue/comment table TEXT fields to LONGTEXT * Use If not Switch Co-authored-by: zeripath <art27@cantab.net>
* Fix openidConnect source regression from #16544 (#16759)zeripath2021-08-221-1/+1
| | | | | | | | | 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>
* [skip ci] Updated licenses and gitignoresGiteaBot2021-08-2218-10/+1173
|
* Add migrate from OneDev (#16356)KN4CK3R2021-08-2224-92/+1093
| | | | | | | | | | | | | | * 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
* Upgrade go.mod go version to 1.16 (#16764)wxiaoguang2021-08-212-2/+2
|
* Download lfs in git and web workflow from minio/s3 directly (#16731)Abner2021-08-212-0/+20
|
* when the update request doesn't intend to update attachments (eg: change ↵wxiaoguang2021-08-211-10/+12
| | | | checkbox state), ignore attachment updates (#16762)
* Added introspection endpoint. (#16752)KN4CK3R2021-08-205-56/+67
| | | Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix dependency link rendering in PR sidebar (#16754)Steven2021-08-211-1/+1
| | | | | | 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>
* Fix dependency translations (#16753)Steven2021-08-211-2/+2
| | | | Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
* Keep attachments on tasklist update (#16750)KN4CK3R2021-08-202-8/+13
| | | | | | | | | | | * Send attachments too. * Use tasklist flag. * use action="ignoreAttachments" instead of "tasklist" * Use boolean parameter. Co-authored-by: zeripath <art27@cantab.net>
* Do not use thin scrollbars on Firefox (#16738)Elouan Martinet2021-08-191-1/+0
| | | | | | | | | | | 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>
* Return nil proxy function if proxy not enabled (#16742)zeripath2021-08-191-1/+3
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix wrong user in OpenID response (#16736)KN4CK3R2021-08-193-10/+101
| | | | | * Fixed usage of wrong user. * Added tests.
* Recreate Tables should Recreate indexes on MySQL (#16718)zeripath2021-08-191-0/+15
| | | | | | | | 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>
* Add edit button to wiki sidebar and footer (#16719)n2021-08-181-0/+6
| | | | | | | | * 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>
* Fix migration svg color (#16715)KN4CK3R2021-08-191-0/+1
| | | | | | | * Fixed svg color. * Use --color-text. Co-authored-by: Lauris BH <lauris@nix.lv>
* Add proxy settings and support for migration and webhook (#16704)Lunny Xiao2021-08-1820-41/+302
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add proxy settings and support for migration and webhook * Fix default value * Add newline for example ini * Add lfs proxy support * Fix lint * Follow @zeripath's review * Fix git clone * Fix test * missgin http requests for proxy * use empty Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
* Refactored and fixed migration tests. (#16714)KN4CK3R2021-08-1710-485/+744
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [skip ci] Updated translations via CrowdinGiteaBot2021-08-181-0/+1
|
* Add API Token Cache (#16547)zeripath2021-08-175-1/+57
| | | | | | | | | | | | | | | | | One of the issues holding back performance of the API is the problem of hashing. Whilst banning BASIC authentication with passwords will help, the API Token scheme still requires a PBKDF2 hash - which means that heavy API use (using Tokens) can still cause enormous numbers of hash computations. A slight solution to this whilst we consider moving to using JWT based tokens and/or a session orientated solution is to simply cache the successful tokens. This has some security issues but this should be balanced by the security issues of load from hashing. Related #14668 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>