]> source.dussan.org Git - gitea.git/log
gitea.git
3 years agoChangelog for 1.14.7 (#16924) (#16928)
zeripath [Thu, 2 Sep 2021 21:56:35 +0000 (22:56 +0100)]
Changelog for 1.14.7 (#16924) (#16928)

* BUGFIXES
  * Add missing gitRepo close at GetDiffRangeWithWhitespaceBehavior (Partial #16894) (#16896)
  * Fix wiki raw commit diff/patch view (#16891) (#16893)
  * Ensure wiki repos are all closed (#16886) (#16889)
  * Upgrade xorm to v1.2.2 (#16663) & Add test to ensure that dumping of login sources remains correct (#16847) (#16849)
  * Recreate Tables should Recreate indexes on MySQL (#16718) (#16740)

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoChangelog 1.15.1 (#16925) (#16929)
zeripath [Thu, 2 Sep 2021 19:39:55 +0000 (20:39 +0100)]
Changelog 1.15.1 (#16925) (#16929)

## [1.15.1](https://github.com/go-gitea/gitea/releases/tag/v1.15.1) - 2021-09-02

* BUGFIXES
  * Allow BASIC authentication access to /:owner/:repo/releases/download/* (#16916) (#16923)
  * Prevent leave changes dialogs due to autofill fields (#16912) (#16920)
  * Ignore review comment when ref commit is missed (#16905) (#16919)
  * Fix wrong attachment removal (#16915) (#16917)
  * Gitlab Migrator: dont ignore reactions of last request (#16903) (#16913)
  * Correctly return the number of Repositories for Organizations (#16807) (#16911)
  * Test if LFS object is accessible (#16865) (#16904)
  * Fix git.Blob.DataAsync(): close pipe since we return a NopCloser (#16899) (#16900)
  * Fix dump and restore respository (#16698) (#16898)
  * Repare and Improve GetDiffRangeWithWhitespaceBehavior (#16894) (#16895)
  * Fix wiki raw commit diff/patch view (#16891) (#16892)
  * Ensure wiki repos are all closed (#16886) (#16888)
  * List limited and private orgs if authenticated on API (#16866) (#16879)
  * Simplify split diff view generation and remove JS dependency (#16775) (#16863)
  * Ensure that the default visibility is set on the user create page (#16845) (#16862)
  * In Render tolerate not being passed a context (#16842) (#16858)
  * Upgrade xorm to v1.2.2 (#16663) & Add test to ensure that dumping of login sources remains correct (#16847) (#16848)
  * Report the correct number of pushes on the feeds (#16811) (#16822)
  * Add primary_key to issue_index (#16813) (#16820)
  * Prevent NPE on empty commit (#16812) (#16819)
  * Fix branch pagination error (#16805) (#16816)
  * Add missing return to handleSettingRemoteAddrError (#16794) (#16795)
  * Remove spurious / from issues.opened_by (#16793)
  * Ensure that template compilation panics are sent to the logs (#16788) (#16792)
  * Update caddyserver/certmagic (#16789) (#16790)

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoAllow BASIC authentication access to /:owner/:repo/releases/download/* (#16916)
zeripath [Thu, 2 Sep 2021 15:48:48 +0000 (16:48 +0100)]
Allow BASIC authentication access to /:owner/:repo/releases/download/* (#16916)

Duplicate #15987 to allow access to releases download through BASIC authentication.

Fix #16914

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoPrevent leave changes dialogs due to autofill fields (#16912)
zeripath [Thu, 2 Sep 2021 12:14:37 +0000 (13:14 +0100)]
Prevent leave changes dialogs due to autofill fields (#16912)

Add ignore-dirty to /user/settings/account
Add autocomplete="off" to push_mirror_address form on /:owner/:repo/settings

Fix #16861

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 2 Sep 2021 00:04:56 +0000 (00:04 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoFix wrong attachment removal (#16915)
wxiaoguang [Wed, 1 Sep 2021 21:53:29 +0000 (05:53 +0800)]
Fix wrong attachment removal (#16915)

3 years agoEnsure that the testlogger has its final test removal safely (#16907)
zeripath [Wed, 1 Sep 2021 13:05:04 +0000 (14:05 +0100)]
Ensure that the testlogger has its final test removal safely (#16907)

It is possible to get a data race right at the end of the TestMain
in integrations during the final removal of the test from the testlogger. This PR
uses a Reset function to remove any final tests but adds some extra
logging which will forcibly fail if there is an unclosed logger.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoIgnore review comment when ref commit is missed (#16905)
Lunny Xiao [Wed, 1 Sep 2021 11:33:07 +0000 (19:33 +0800)]
Ignore review comment when ref commit is missed (#16905)

3 years agoGitlab Migrator: dont ignore reactions of last request (#16903)
6543 [Wed, 1 Sep 2021 10:20:19 +0000 (12:20 +0200)]
Gitlab Migrator: dont ignore reactions of last request (#16903)

Fix bug related to early breaking when migrating reactions.

3 years agoCorrectly return the number of Repositories for Organizations (#16807)
zeripath [Wed, 1 Sep 2021 05:31:42 +0000 (06:31 +0100)]
Correctly return the number of Repositories for Organizations (#16807)

Calculate and return the number of Repositories on the dashboard
Organization list.

This PR restores some of the logic that was removed in #14032 to
calculate the number of repos on the dashboard orgs list.

Fix #16648
Replaces #16799

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoWorkaround coverage bug part 2 (#16906)
zeripath [Wed, 1 Sep 2021 02:43:29 +0000 (03:43 +0100)]
Workaround coverage bug part 2 (#16906)

* Workaround coverage bug part 2

Just grep away bad lines from coverage files.

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

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoAdd option to update pull request by `rebase` (#16125)
a1012112796 [Tue, 31 Aug 2021 14:03:45 +0000 (22:03 +0800)]
Add option to update pull request by `rebase` (#16125)

* add option to update pull request by `rebase`

Signed-off-by: a1012112796 <1012112796@qq.com>
3 years agoTest if LFS object is accessible (#16865)
KN4CK3R [Tue, 31 Aug 2021 13:35:08 +0000 (15:35 +0200)]
Test if LFS object is accessible (#16865)

* Test if object is accessible.

* Added more logging.

3 years agoFix git.Blob.DataAsync(): close pipe since we return a NopCloser (#16899)
6543 [Tue, 31 Aug 2021 07:43:31 +0000 (09:43 +0200)]
Fix git.Blob.DataAsync(): close pipe since we return a NopCloser (#16899)

* make sure headGitRepo is closed on err too

* refactor

* Fix git.Blob.DataAsync(): exec cancel since we already read all bytes (close pipe since we return a NopCloser)

3 years agoRepare and Improve GetDiffRangeWithWhitespaceBehavior (#16894)
6543 [Tue, 31 Aug 2021 04:16:23 +0000 (06:16 +0200)]
Repare and Improve GetDiffRangeWithWhitespaceBehavior (#16894)

* repare and improve GetDiffRangeWithWhitespaceBehavior

* Context with Timeout

3 years agoRemove ParseQueueConnStr as it is unused (#16878)
zeripath [Tue, 31 Aug 2021 03:33:16 +0000 (04:33 +0100)]
Remove ParseQueueConnStr as it is unused (#16878)

Remove ParseQueueConnStr as `modules/nosql` has taken over all of its functions.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix wiki raw commit diff/patch view (#16891)
6543 [Tue, 31 Aug 2021 02:22:54 +0000 (04:22 +0200)]
Fix wiki raw commit diff/patch view (#16891)

3 years agoFix dump and restore respository (#16698)
Lunny Xiao [Tue, 31 Aug 2021 01:18:15 +0000 (09:18 +0800)]
Fix dump and restore respository (#16698)

* Fix dump and restore

* return different error message for get commit

* Fix missing delete release attachment when deleting repository

* Fix ci and add some comments

Co-authored-by: zeripath <art27@cantab.net>
3 years agoPrevent coverage break (#16887)
zeripath [Mon, 30 Aug 2021 23:41:08 +0000 (00:41 +0100)]
Prevent coverage break (#16887)

* Prevent coverage break

There are repeated failures of our CI due to an intermittent issue with coverage.out
finishing with a spurious `0` on a single line.

This problem is very annoying and very hard to understand where it is coming from,
therefore as the problem appears random and without clear cause we should just strip
this line from our coverage.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoFix report card link (#16885)
Richard Ulmer [Mon, 30 Aug 2021 23:06:30 +0000 (01:06 +0200)]
Fix report card link (#16885)

3 years agoEnsure wiki repos are all closed (#16886)
zeripath [Mon, 30 Aug 2021 20:50:35 +0000 (21:50 +0100)]
Ensure wiki repos are all closed (#16886)

There are multiple places where wiki git repositories are not properly closed.

This PR ensures they are closed.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago[API] List limited and private orgs if authentificated (#16866)
6543 [Mon, 30 Aug 2021 18:00:59 +0000 (20:00 +0200)]
[API] List limited and private orgs if authentificated (#16866)

* fix bug #16785 and similar

* code format

* CI.restart()

3 years agoTimeout on flush in testing (#16864)
zeripath [Mon, 30 Aug 2021 04:27:51 +0000 (05:27 +0100)]
Timeout on flush in testing (#16864)

* Timeout on flush in testing

At the end of each test the queues are flushed. At present there is no limit on the
length of time a flush can take which can lead to long flushes.

However, if the CI task is cancelled we lose the log information as to where the long
flush was taking place.

This PR simply adds a default time limit of 2 minutes - at which point an error will
be produced. This should allow us to more easily find the culprit.

Signed-off-by: Andrew Thornton <art27@cantab.net>
* return better error

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 30 Aug 2021 00:04:50 +0000 (00:04 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoRemove unused Fomantic sidebar module (#16853)
silverwind [Sun, 29 Aug 2021 19:57:07 +0000 (21:57 +0200)]
Remove unused Fomantic sidebar module (#16853)

* Remove unused Fomantic sidebar module

The [Sidebar](https://fomantic-ui.com/modules/sidebar.html) module seems
currently unused (at least I can't find any reference to it in templates
or js), so remove it from the Fomantic build.

* remove useless minified fomantic build files

* mark fomantic build files as being generated

3 years agoupdate theme doc (#16860)
Patrick Schratz [Sun, 29 Aug 2021 18:26:43 +0000 (20:26 +0200)]
update theme doc (#16860)

3 years agoPaginate releases page & set default page size to 10 (#16857)
Lunny Xiao [Sun, 29 Aug 2021 16:25:16 +0000 (00:25 +0800)]
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 agoSimplify split diff view generation and remove JS dependency (#16775)
zeripath [Sun, 29 Aug 2021 14:28:04 +0000 (15:28 +0100)]
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 agoAdd GoLand configuration in hacking on gitea (#16843)
wxiaoguang [Sun, 29 Aug 2021 03:25:08 +0000 (11:25 +0800)]
Add GoLand configuration in hacking on gitea (#16843)

Co-authored-by: zeripath <art27@cantab.net>
3 years agoCI: rm unit-test-race step since its now coverd by unit-test too (#16856)
6543 [Sun, 29 Aug 2021 01:42:56 +0000 (03:42 +0200)]
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[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 29 Aug 2021 00:04:59 +0000 (00:04 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoIn Render tolerate not being passed a context (#16842)
zeripath [Sat, 28 Aug 2021 20:15:56 +0000 (21:15 +0100)]
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 agoEnsure that the default visibility is set on the user create page (#16845)
zeripath [Sat, 28 Aug 2021 14:19:52 +0000 (15:19 +0100)]
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 agoRefactor the fork service slightly to take ForkRepoOptions (#16744)
Kyle Evans [Sat, 28 Aug 2021 08:37:14 +0000 (03:37 -0500)]
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 agoAdd test to ensure that dumping of login sources remains correct (#16847)
zeripath [Sat, 28 Aug 2021 03:25:27 +0000 (04:25 +0100)]
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 agoDecoupled code from DefaultSigningKey (#16743)
KN4CK3R [Fri, 27 Aug 2021 19:28:00 +0000 (21:28 +0200)]
Decoupled code from DefaultSigningKey (#16743)

Decoupled code from `DefaultSigningKey`. Makes testing a little bit easier and is cleaner.

3 years agoPrevent "Race" detected in TestAdmin*User (#16830)
zeripath [Fri, 27 Aug 2021 13:00:37 +0000 (14:00 +0100)]
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 agoAdd modals to Organization and Team remove/leave (#16471)
zeripath [Fri, 27 Aug 2021 02:57:40 +0000 (03:57 +0100)]
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[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 27 Aug 2021 00:04:45 +0000 (00:04 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoEnable race detector for CI (#1441)
Mura Li [Thu, 26 Aug 2021 08:50:04 +0000 (16:50 +0800)]
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[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 26 Aug 2021 00:04:46 +0000 (00:04 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoReport the correct number of pushes on the feeds (#16811)
zeripath [Wed, 25 Aug 2021 23:04:58 +0000 (00:04 +0100)]
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 agoAdd EdDSA JWT signing algorithm (#16786)
Aliaksandr Mianzhynski [Wed, 25 Aug 2021 20:50:38 +0000 (23:50 +0300)]
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 agoActually compute proper foreground color for labels (#16729)
Clar Fon [Wed, 25 Aug 2021 17:55:47 +0000 (13:55 -0400)]
Actually compute proper foreground color for labels (#16729)

3 years agoUnify migration descriptions (#16781)
delvh [Wed, 25 Aug 2021 13:47:05 +0000 (15:47 +0200)]
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 agoUse a common quote to instead of check database type (#16817)
Lunny Xiao [Wed, 25 Aug 2021 12:23:34 +0000 (20:23 +0800)]
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 agoAdd primary_key to issue_index (#16813)
zeripath [Wed, 25 Aug 2021 08:42:51 +0000 (09:42 +0100)]
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 agoPrevent NPE on empty commit (#16812)
zeripath [Tue, 24 Aug 2021 23:33:23 +0000 (00:33 +0100)]
Prevent NPE on empty commit (#16812)

3 years agoFix branch pagination error (#16805)
Lunny Xiao [Tue, 24 Aug 2021 22:15:07 +0000 (06:15 +0800)]
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 agoAdd information for migrate failure (#16803)
Lunny Xiao [Tue, 24 Aug 2021 17:46:55 +0000 (01:46 +0800)]
Add information for migrate failure (#16803)

Improve the reporting of errors when there is a migration failure

3 years agoAdd bundle download for repository (#14538)
John Olheiser [Tue, 24 Aug 2021 16:47:09 +0000 (11:47 -0500)]
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[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 24 Aug 2021 00:04:47 +0000 (00:04 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoAdd missing return to handleSettingRemoteAddrError (#16794)
zeripath [Mon, 23 Aug 2021 22:09:25 +0000 (23:09 +0100)]
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 agoUpdate caddyserver/certmagic (#16789)
zeripath [Mon, 23 Aug 2021 22:07:40 +0000 (23:07 +0100)]
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 agoJust use a slice when rendering file (#16774)
zeripath [Mon, 23 Aug 2021 21:23:39 +0000 (22:23 +0100)]
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 agoEnsure that template compilation panics are sent to the logs (#16788)
zeripath [Mon, 23 Aug 2021 19:40:59 +0000 (20:40 +0100)]
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[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 23 Aug 2021 00:04:31 +0000 (00:04 +0000)]
[skip ci] Updated translations via Crowdin

3 years agofrontport: 1.15.0 changelog (#16772)
techknowlogick [Sun, 22 Aug 2021 19:29:51 +0000 (15:29 -0400)]
frontport: 1.15.0 changelog (#16772)

* frontport: 1.15.0 changelog

* Update config.yaml

3 years agoAlter issue/comment table TEXT fields to LONGTEXT (#16765)
wxiaoguang [Sun, 22 Aug 2021 15:33:05 +0000 (23:33 +0800)]
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 agoFix openidConnect source regression from #16544 (#16759)
zeripath [Sun, 22 Aug 2021 09:17:05 +0000 (10:17 +0100)]
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[skip ci] Updated licenses and gitignores
GiteaBot [Sun, 22 Aug 2021 00:06:14 +0000 (00:06 +0000)]
[skip ci] Updated licenses and gitignores

3 years agoAdd migrate from OneDev (#16356)
KN4CK3R [Sat, 21 Aug 2021 22:47:45 +0000 (00:47 +0200)]
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 agoUpgrade go.mod go version to 1.16 (#16764)
wxiaoguang [Sat, 21 Aug 2021 19:04:17 +0000 (03:04 +0800)]
Upgrade go.mod go version to 1.16 (#16764)

3 years agoDownload lfs in git and web workflow from minio/s3 directly (#16731)
Abner [Sat, 21 Aug 2021 18:22:06 +0000 (02:22 +0800)]
Download lfs in git and web workflow from minio/s3 directly (#16731)

3 years agowhen the update request doesn't intend to update attachments (eg: change checkbox...
wxiaoguang [Sat, 21 Aug 2021 13:04:47 +0000 (21:04 +0800)]
when the update request doesn't intend to update attachments (eg: change checkbox state), ignore attachment updates (#16762)

3 years agoAdded introspection endpoint. (#16752)
KN4CK3R [Sat, 21 Aug 2021 02:16:45 +0000 (04:16 +0200)]
Added introspection endpoint. (#16752)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoFix dependency link rendering in PR sidebar (#16754)
Steven [Sat, 21 Aug 2021 00:02:47 +0000 (02:02 +0200)]
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 agoFix dependency translations (#16753)
Steven [Fri, 20 Aug 2021 23:13:45 +0000 (01:13 +0200)]
Fix dependency translations (#16753)

Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
3 years agoKeep attachments on tasklist update (#16750)
KN4CK3R [Fri, 20 Aug 2021 19:26:19 +0000 (21:26 +0200)]
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 agoDo not use thin scrollbars on Firefox (#16738)
Elouan Martinet [Thu, 19 Aug 2021 21:31:47 +0000 (23:31 +0200)]
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 agoReturn nil proxy function if proxy not enabled (#16742)
zeripath [Thu, 19 Aug 2021 20:41:20 +0000 (21:41 +0100)]
Return nil proxy function if proxy not enabled (#16742)

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix wrong user in OpenID response (#16736)
KN4CK3R [Thu, 19 Aug 2021 16:11:30 +0000 (18:11 +0200)]
Fix wrong user in OpenID response (#16736)

* Fixed usage of wrong user.

* Added tests.

3 years agoRecreate Tables should Recreate indexes on MySQL (#16718)
zeripath [Thu, 19 Aug 2021 04:11:36 +0000 (05:11 +0100)]
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 agoAdd edit button to wiki sidebar and footer (#16719)
n [Wed, 18 Aug 2021 18:14:08 +0000 (03:14 +0900)]
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 agoFix migration svg color (#16715)
KN4CK3R [Wed, 18 Aug 2021 16:07:52 +0000 (18:07 +0200)]
Fix migration svg color (#16715)

* Fixed svg color.

* Use --color-text.

Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoAdd proxy settings and support for migration and webhook (#16704)
Lunny Xiao [Wed, 18 Aug 2021 13:10:39 +0000 (21:10 +0800)]
Add proxy settings and support for migration and webhook (#16704)

* 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>
3 years agoRefactored and fixed migration tests. (#16714)
KN4CK3R [Wed, 18 Aug 2021 00:47:18 +0000 (02:47 +0200)]
Refactored and fixed migration tests. (#16714)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 18 Aug 2021 00:04:48 +0000 (00:04 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoAdd API Token Cache (#16547)
zeripath [Tue, 17 Aug 2021 18:30:42 +0000 (19:30 +0100)]
Add API Token Cache (#16547)

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>
3 years agobuild with go1.17 (#16707)
techknowlogick [Tue, 17 Aug 2021 12:31:28 +0000 (08:31 -0400)]
build with go1.17 (#16707)

Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoUse github token URL when fetching oauth token (#16709)
techknowlogick [Tue, 17 Aug 2021 08:07:52 +0000 (04:07 -0400)]
Use github token URL when fetching oauth token (#16709)

Fixes regression from #16544

3 years agoUpdate JS dependencies (#16708)
silverwind [Tue, 17 Aug 2021 05:32:48 +0000 (07:32 +0200)]
Update JS dependencies (#16708)

* Update JS dependencies

- Update all JS dependencies
- Adapt to recent webpack changes
- Add new lint rules and fix issues
- Regenerate SVGs and update svgo api usage

Fixes: https://github.com/go-gitea/gitea/pull/16492
* adapt jest config and sort keys

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 17 Aug 2021 00:07:42 +0000 (00:07 +0000)]
[skip ci] Updated translations via Crowdin

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 16 Aug 2021 00:07:41 +0000 (00:07 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoUpgrade levelqueue 0.4.1 (#16696)
Lunny Xiao [Sun, 15 Aug 2021 20:52:26 +0000 (04:52 +0800)]
Upgrade levelqueue 0.4.1 (#16696)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 15 Aug 2021 00:07:47 +0000 (00:07 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoImprove resource string (#16691)
delvh [Sat, 14 Aug 2021 14:10:39 +0000 (16:10 +0200)]
Improve resource string (#16691)

* Improve resource string

Co-authored-by: zeripath <art27@cantab.net>
3 years ago Fix spelling of HookProcReceiveResult (#16690)
Lunny Xiao [Sat, 14 Aug 2021 11:17:10 +0000 (19:17 +0800)]
 Fix spelling of HookProcReceiveResult (#16690)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 14 Aug 2021 00:07:48 +0000 (00:07 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoEnsure empty lines are copiable and final new line too (#16678)
zeripath [Fri, 13 Aug 2021 23:16:56 +0000 (00:16 +0100)]
Ensure empty lines are copiable and final new line too (#16678)

* Ensure empty lines are copiable and final new line too

When files are highlighted the newline character needs to be added in a whitespace
compliant mode. Also ensure the final empty newline is rendered.

Fix #16434

* Add test and ensure spans closed

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoAdd filter by owner and team to issue/pulls search endpoint (#16662)
Jimmy Praet [Fri, 13 Aug 2021 20:47:25 +0000 (22:47 +0200)]
Add filter by owner and team to issue/pulls search endpoint (#16662)

* Filter by owner and team in API issue/pulls search

* Add integration test

3 years agoUpdate issue_index to finish migration (#16685)
6543 [Fri, 13 Aug 2021 13:06:18 +0000 (15:06 +0200)]
Update issue_index to finish migration (#16685)

* update issue_index to finish migration

* One Func to RecalculateIssueIndexForRepo

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 13 Aug 2021 00:07:45 +0000 (00:07 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoUpgrade xorm to v1.2.2 (#16663)
Lunny Xiao [Thu, 12 Aug 2021 23:11:42 +0000 (07:11 +0800)]
Upgrade xorm to v1.2.2 (#16663)

* Upgrade xorm to v1.2.2

* Change the Engine interface to match xorm v1.2.2

3 years agoFix NPE in fuzzer (#16680)
zeripath [Thu, 12 Aug 2021 22:22:05 +0000 (23:22 +0100)]
Fix NPE in fuzzer (#16680)

The fuzzer found an issue with the issue pattern processor where there is a spurious
path.Clean which does not need to be there. This PR also sets the default AppURL for
the fuzzer too.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago[API] generalize list header (#16551)
6543 [Thu, 12 Aug 2021 12:43:08 +0000 (14:43 +0200)]
[API] generalize list header (#16551)

* Add info about list endpoints to CONTRIBUTING.md

* Let all list endpoints return X-Total-Count header

* Add TODOs for GetCombinedCommitStatusByRef

* Fix models/issue_stopwatch.go

* Rrefactor models.ListDeployKeys

* Introduce helper func and use them for SetLinkHeader related func

3 years agoAdd link to vscode to repo header (#16664)
a1012112796 [Thu, 12 Aug 2021 12:21:34 +0000 (20:21 +0800)]
Add link to vscode to repo header (#16664)

add link to vscode to repo header

Signed-off-by: a1012112796 <1012112796@qq.com>
3 years agoSend registration email on user autoregistration (#16523)
zeripath [Thu, 12 Aug 2021 07:26:33 +0000 (08:26 +0100)]
Send registration email on user autoregistration (#16523)

When users login and are autoregistered send email notification.

Fix #16178

* Protect public functions within the mailer by testing if the mailer is configured

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoImprove SMTP authentication and Fix user creation bugs (#16612)
zeripath [Wed, 11 Aug 2021 20:42:58 +0000 (21:42 +0100)]
Improve SMTP authentication and Fix user creation bugs  (#16612)

* Improve SMTP authentication, Fix user creation bugs and add LDAP cert/key options

This PR has two parts:

Improvements for SMTP authentication:

* Default to use SMTPS if port is 465, and allow setting of force SMTPS.
* Always use STARTTLS if available
* Provide CRAM-MD5 mechanism
* Add options for HELO hostname disabling
* Add options for providing certificates and keys
* Handle application specific password response as a failed user login
instead of as a 500.

Close #16104

Fix creation of new users:

* A bug was introduced when allowing users to change usernames which
prevents the creation of external users.
* The LoginSource refactor also broke this page.

Close #16104

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoRelated refactors to ctx.FormX functions (#16567)
6543 [Wed, 11 Aug 2021 15:08:52 +0000 (17:08 +0200)]
Related refactors to ctx.FormX functions (#16567)

* use FormTrim if posible

* speedup goGet

* only convert if nessesary