Commit graph

13436 commits

Author SHA1 Message Date
techknowlogick
22c73278bc
update docs to 1.15.2 2021-09-03 13:49:06 -04:00
zeripath
7d1d32a436
Changelog 1.15.2 () ()
## [1.15.2](https://github.com/go-gitea/gitea/releases/tag/v1.15.2) - 2021-09-03

* BUGFIXES
  * Add unique constraint back into issue_index ()
  * Close storage objects before cleaning () ()

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-09-04 01:06:40 +08:00
aceArt-GmbH
f3b36e2a39
Doc: Mail-Tempales: Fix AppUrl function name ()
Thanks to https://github.com/go-gitea/gitea/pull/16788 I can see why our docker container kept restarting when adding the custom mail template example.
[The example template](https://docs.gitea.io/en-us/mail-templates/#example) has an error

```
2021/09/03 10:55:25 cmd/web.go:91:func1() [F] PANIC: template: mail/issue/default:35: function "AppURL" not defined
        /usr/local/go/src/html/template/template.go:374 (0x1563bb8)
        /go/src/code.gitea.io/gitea/vendor/github.com/unrolled/render/render.go:322 (0x1563782)
        /go/src/code.gitea.io/gitea/vendor/github.com/unrolled/render/render.go:202 (0x1562f8b)
        /go/src/code.gitea.io/gitea/vendor/github.com/unrolled/render/render.go:146 (0x15629d2)
        /go/src/code.gitea.io/gitea/modules/templates/base.go:88 (0x16b0769)
        /go/src/code.gitea.io/gitea/routers/web/base.go:125 (0x225f284)
        /go/src/code.gitea.io/gitea/routers/web/web.go:95 (0x2261284)
        /go/src/code.gitea.io/gitea/routers/init.go:147 (0x22817ba)
        /go/src/code.gitea.io/gitea/cmd/web.go:158 (0x239741a)
        /go/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/app.go:524 (0x1740884)
        /go/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/command.go:173 (0x17415f8)
        /go/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/app.go:277 (0x173e8c7)
        /go/src/code.gitea.io/gitea/main.go:115 (0x23d3e69)
        /usr/local/go/src/runtime/proc.go:225 (0x443995)
        /usr/local/go/src/runtime/asm_amd64.s:1371 (0x47b360)
```
2021-09-03 12:49:42 +01:00
zeripath
076bb8a2a2
Close storage objects before cleaning ()
Storage.Iterate provides the path and an open object. On windows using
local storage means that the objects will be locked thus preventing clean
from deleting them.

This PR simply closes the objects early.

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-09-03 11:48:49 +01:00
zeripath
6c125e9797
Use immediate queues in integration tests and ensure that immediate ()
queue type is also used for unique queues.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-09-03 11:20:57 +01:00
GiteaBot
219dec030d [skip ci] Updated translations via Crowdin 2021-09-03 00:04:56 +00:00
zeripath
b6c752e914
Changelog for 1.14.7 () ()
* BUGFIXES
  * Add missing gitRepo close at GetDiffRangeWithWhitespaceBehavior (Partial ) ()
  * Fix wiki raw commit diff/patch view () ()
  * Ensure wiki repos are all closed () ()
  * Upgrade xorm to v1.2.2 () & Add test to ensure that dumping of login sources remains correct () ()
  * Recreate Tables should Recreate indexes on MySQL () ()

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-09-03 05:56:35 +08:00
zeripath
33af0c3aa2
Changelog 1.15.1 () ()
## [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/* () ()
  * Prevent leave changes dialogs due to autofill fields () ()
  * Ignore review comment when ref commit is missed () ()
  * Fix wrong attachment removal () ()
  * Gitlab Migrator: dont ignore reactions of last request () ()
  * Correctly return the number of Repositories for Organizations () ()
  * Test if LFS object is accessible () ()
  * Fix git.Blob.DataAsync(): close pipe since we return a NopCloser () ()
  * Fix dump and restore respository () ()
  * Repare and Improve GetDiffRangeWithWhitespaceBehavior () ()
  * Fix wiki raw commit diff/patch view () ()
  * Ensure wiki repos are all closed () ()
  * List limited and private orgs if authenticated on API () ()
  * Simplify split diff view generation and remove JS dependency () ()
  * Ensure that the default visibility is set on the user create page () ()
  * In Render tolerate not being passed a context () ()
  * Upgrade xorm to v1.2.2 () & Add test to ensure that dumping of login sources remains correct () ()
  * Report the correct number of pushes on the feeds () ()
  * Add primary_key to issue_index () ()
  * Prevent NPE on empty commit () ()
  * Fix branch pagination error () ()
  * Add missing return to handleSettingRemoteAddrError () ()
  * Remove spurious / from issues.opened_by ()
  * Ensure that template compilation panics are sent to the logs () ()
  * Update caddyserver/certmagic () ()

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-09-02 15:39:55 -04:00
zeripath
a75b2f2842
Allow BASIC authentication access to /:owner/:repo/releases/download/* ()
Duplicate  to allow access to releases download through BASIC authentication.

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-09-02 16:48:48 +01:00
zeripath
268b2d0c91
Prevent leave changes dialogs due to autofill fields ()
Add ignore-dirty to /user/settings/account
Add autocomplete="off" to push_mirror_address form on /:owner/:repo/settings

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-09-02 13:14:37 +01:00
GiteaBot
9b4280ea4b [skip ci] Updated translations via Crowdin 2021-09-02 00:04:56 +00:00
wxiaoguang
07fde28ddb
Fix wrong attachment removal () 2021-09-01 23:53:29 +02:00
zeripath
6e0e414f55
Ensure that the testlogger has its final test removal safely ()
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>
2021-09-01 14:05:04 +01:00
Lunny Xiao
de2e96e37b
Ignore review comment when ref commit is missed () 2021-09-01 12:33:07 +01:00
6543
7062614dee
Gitlab Migrator: dont ignore reactions of last request ()
Fix bug related to early breaking when migrating reactions.
2021-09-01 11:20:19 +01:00
zeripath
57b0887ab2
Correctly return the number of Repositories for Organizations ()
Calculate and return the number of Repositories on the dashboard
Organization list.

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

Fix 
Replaces 

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

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-09-01 01:31:42 -04:00
zeripath
83640a595b
Workaround coverage bug part 2 ()
* 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>
2021-08-31 22:43:29 -04:00
a1012112796
cbf05c3f79
Add option to update pull request by rebase ()
* add option to update pull request by `rebase`

Signed-off-by: a1012112796 <1012112796@qq.com>
2021-08-31 16:03:45 +02:00
KN4CK3R
2bb32006fd
Test if LFS object is accessible ()
* Test if object is accessible.

* Added more logging.
2021-08-31 14:35:08 +01:00
6543
d21702475b
Fix git.Blob.DataAsync(): close pipe since we return a NopCloser ()
* 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)
2021-08-31 08:43:31 +01:00
6543
bb4cc876b1
Repare and Improve GetDiffRangeWithWhitespaceBehavior ()
* repare and improve GetDiffRangeWithWhitespaceBehavior

* Context with Timeout
2021-08-31 06:16:23 +02:00
zeripath
f2b4b0f491
Remove ParseQueueConnStr as it is unused ()
Remove ParseQueueConnStr as `modules/nosql` has taken over all of its functions.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-08-31 05:33:16 +02:00
6543
6d97befddf
Fix wiki raw commit diff/patch view () 2021-08-31 04:22:54 +02:00
Lunny Xiao
8d7704b5a2
Fix dump and restore respository ()
* 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>
2021-08-30 21:18:15 -04:00
zeripath
c0f5da3e1a
Prevent coverage break ()
* 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>
2021-08-31 01:41:08 +02:00
Richard Ulmer
87eb82cf52
Fix report card link () 2021-08-31 01:06:30 +02:00
zeripath
9119d24573
Ensure wiki repos are all closed ()
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>
2021-08-30 22:50:35 +02:00
6543
73394f435c
[API] List limited and private orgs if authentificated ()
* fix bug  and similar

* code format

* CI.restart()
2021-08-30 14:00:59 -04:00
zeripath
06b9d553bc
Timeout on flush in testing ()
* 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>
2021-08-30 00:27:51 -04:00
GiteaBot
b0ff429882 [skip ci] Updated translations via Crowdin 2021-08-30 00:04:50 +00:00
silverwind
360d8e7c23
Remove unused Fomantic sidebar module ()
* 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
2021-08-29 21:57:07 +02:00
Patrick Schratz
968225e59c
update theme doc () 2021-08-29 14:26:43 -04:00
Lunny Xiao
d985d4bc2f
Paginate releases page & set default page size to 10 ()
* Add release default page and set it to 10

* use limit

Co-authored-by: 6543 <6543@obermui.de>
2021-08-29 18:25:16 +02:00
zeripath
f5b0e2c9d2
Simplify split diff view generation and remove JS dependency ()
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 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-08-29 15:28:04 +01:00
wxiaoguang
d24eb6e6ce
Add GoLand configuration in hacking on gitea ()
Co-authored-by: zeripath <art27@cantab.net>
2021-08-28 23:25:08 -04:00
6543
7815f244d6
CI: rm unit-test-race step since its now coverd by unit-test too ()
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-08-29 09:42:56 +08:00
GiteaBot
5e71b9c200 [skip ci] Updated translations via Crowdin 2021-08-29 00:04:59 +00:00
zeripath
c9c0475f4d
In Render tolerate not being passed a context ()
* 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 

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>
2021-08-28 21:15:56 +01:00
zeripath
90c0180447
Ensure that the default visibility is set on the user create page ()
Set the default visibility on the user create page.

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-08-28 15:19:52 +01:00
Kyle Evans
cad70599a6
Refactor the fork service slightly to take ForkRepoOptions ()
* 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>
2021-08-28 16:37:14 +08:00
zeripath
1904941382
Add test to ensure that dumping of login sources remains correct ()
 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>
2021-08-28 04:25:27 +01:00
KN4CK3R
88abb0dc8a
Decoupled code from DefaultSigningKey ()
Decoupled code from `DefaultSigningKey`. Makes testing a little bit easier and is cleaner.
2021-08-27 20:28:00 +01:00
zeripath
cd8db3a83d
Prevent "Race" detected in TestAdmin*User ()
These tests are missing the defer prefix.

Related 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-08-27 15:00:37 +02:00
zeripath
e37342db0c
Add modals to Organization and Team remove/leave ()
* Add modals to Organization and Team remove/leave

Add confirmation modals to Organization and Team remove and leave.

Fix 

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>
2021-08-26 22:57:40 -04:00
GiteaBot
3289aceec2 [skip ci] Updated translations via Crowdin 2021-08-27 00:04:45 +00:00
Mura Li
b60e814055
Enable race detector for CI ()
* 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>
2021-08-26 16:50:04 +08:00
GiteaBot
c446901a5d [skip ci] Updated translations via Crowdin 2021-08-26 00:04:46 +00:00
zeripath
ba6baff696
Report the correct number of pushes on the feeds ()
* 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 

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

* Update templates/user/dashboard/feeds.tmpl

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-08-25 19:04:58 -04:00
Aliaksandr Mianzhynski
28ac4a7a87
Add EdDSA JWT signing algorithm ()
* Add EdDSA signing algorithm

* Fix typo

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-08-25 16:50:38 -04:00
Clar Fon
29b971b6d5
Actually compute proper foreground color for labels () 2021-08-25 12:55:47 -05:00