]>
source.dussan.org Git - gitea.git/log
Martin Strob [Fri, 25 Jun 2021 12:38:41 +0000 (14:38 +0200)]
fix IIS reverse proxy doc (#16246)
GiteaBot [Fri, 25 Jun 2021 00:11:36 +0000 (00:11 +0000)]
[skip ci] Updated translations via Crowdin
sebastian-sauer [Thu, 24 Jun 2021 22:05:51 +0000 (00:05 +0200)]
API: Allow COMMENT reviews to not specify a body (#16229)
* Allow COMMENT reviews to not specify a body
when using web ui there is no need to specify a body.
so we don't need to specify a body if adding a COMMENT-review
via our api.
* Ensure comments or Body is provided
and add some integration tests for reviewtype COMMENT.
Signed-off-by: Sebastian Sauer <sauer.sebastian@gmail.com>
Mura Li [Thu, 24 Jun 2021 18:37:07 +0000 (02:37 +0800)]
Replace ARCCache with TwoQueueCache to avoid patent issue (#16240)
Co-authored-by: Mura Li <typeless@users.noreply.github.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
KN4CK3R [Thu, 24 Jun 2021 15:47:46 +0000 (17:47 +0200)]
Fix diff expansion is missing final line in a file (#16222)
* Fixed down offset.
* Fixed wrong line count result.
GiteaBot [Thu, 24 Jun 2021 00:11:37 +0000 (00:11 +0000)]
[skip ci] Updated translations via Crowdin
zeripath [Wed, 23 Jun 2021 23:02:23 +0000 (00:02 +0100)]
Do not show No match found for tribute (#16231)
Tribute.js will show an untranslated no match found if no emoji or mentions.
Further the mentions should really require a preceding space.
This PR fixes both of these.
Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath [Wed, 23 Jun 2021 21:41:39 +0000 (22:41 +0100)]
Don't WARN log UserNotExist errors on ExternalUserLogin failure (#16238)
Instead log these at debug - with warn logging for other errors.
Fix #16235
Signed-off-by: Andrew Thornton <art27@cantab.net>
Lunny Xiao [Wed, 23 Jun 2021 21:12:38 +0000 (05:12 +0800)]
Rework repository archive (#14723)
* Use storage to store archive files
* Fix backend lint
* Add archiver table on database
* Finish archive download
* Fix test
* Add database migrations
* Add status for archiver
* Fix lint
* Add queue
* Add doctor to check and delete old archives
* Improve archive queue
* Fix tests
* improve archive storage
* Delete repo archives
* Add missing fixture
* fix fixture
* Fix fixture
* Fix test
* Fix archiver cleaning
* Fix bug
* Add docs for repository archive storage
* remove repo-archive configuration
* Fix test
* Fix test
* Fix lint
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
KN4CK3R [Wed, 23 Jun 2021 21:09:51 +0000 (23:09 +0200)]
Add sanitizer rules per renderer (#16110)
* Added sanitizer rules per renderer.
* Updated documentation.
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
6543 [Wed, 23 Jun 2021 21:08:47 +0000 (23:08 +0200)]
[API] Add repoGetTag (#16166)
* GetTag -> GetAnnotatedTag
* API: Add repoGetTag
* fix swagger docs
* support "/" as tag name char
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Viktor Yakovchuk [Wed, 23 Jun 2021 21:08:26 +0000 (00:08 +0300)]
Fix 500 Error with branch and tag sharing the same name #15592 (#16040)
* Fix 500 Error with branch and tag sharing the same name #15592
Fixed 500 error while create Pull request when there are more
than one sources (branch, tag) with the same name
Fix #15592
Signed-off-by: Viktor Yakovchuk <viktor@yakovchuk.net>
* fix logging
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: 6543 <6543@obermui.de>
Lunny Xiao [Wed, 23 Jun 2021 20:45:47 +0000 (04:45 +0800)]
Add code block highlight to orgmode back (#14222)
Fix missed orgmode code block hightlight
Co-authored-by: zeripath <art27@cantab.net>
6543 [Wed, 23 Jun 2021 19:58:44 +0000 (21:58 +0200)]
[API] GET / SET User Settings (#16169)
* API: GET/SET User Settings
* linter
* Apply suggestions from code review
* Update modules/structs/user.go
* lint
* fix swagger
* move User2UserSettings to convert
* as per @zeripath "preferences" -> "settings"
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
techknowlogick [Wed, 23 Jun 2021 19:57:56 +0000 (15:57 -0400)]
Add docs for windows env vars (#16236)
* Add docs for windows env vars
Fix #16213
* Fix docs/content/doc/developers/hacking-on-gitea.en-us.md
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
KN4CK3R [Wed, 23 Jun 2021 19:38:19 +0000 (21:38 +0200)]
Small refactoring of modules/private (#15947)
* Use correct variable name.
* doer is never nil here.
* Use status code constants.
* Replaced generic map with concrete struct.
* Fixed windows lint.
* Removed unused method.
* Changed error codes.
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
6543 [Wed, 23 Jun 2021 17:43:33 +0000 (19:43 +0200)]
Fix Nits (#16234)
* template fix
* nits
* add doer to "created issue/pull"
KN4CK3R [Wed, 23 Jun 2021 14:56:25 +0000 (16:56 +0200)]
Use data path instead of config path (#16227)
6543 [Wed, 23 Jun 2021 12:33:21 +0000 (14:33 +0200)]
Localize Email Templates (#16200)
close #14822
techknowlogick [Wed, 23 Jun 2021 05:36:27 +0000 (01:36 -0400)]
Run compliance on amd64 infra (#16232)
* Run compliance on amd64 infra
* Update .drone.yml
Jimmy Praet [Wed, 23 Jun 2021 04:14:22 +0000 (06:14 +0200)]
Improve notifications for WIP draft PR's (#14663)
* #14559 Reduce amount of email notifications for WIP draft PR's
don't notify repo watchers of WIP draft PR's
* #13190 Notification when WIP Pull Request is ready for review
* Send email notification to repo watchers when WIP PR is created
* Send ui notification to repo watchers when WIP PR is created
* send specific email notification when PR is marked ready for review
instead of reusing the CreatePullRequest action
* Fix lint error
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
sebastian-sauer [Tue, 22 Jun 2021 20:13:31 +0000 (22:13 +0200)]
Use pulls url if issue is a pull request (#16230)
if a pull request is displayed use the /pulls path
if a pull requests diff is displayed use the /pulls/{id}/files url
if an issue is displayed use the issues url
Fixes #16102
Signed-off-by: Sebastian Sauer <sauer.sebastian@gmail.com>
zeripath [Mon, 21 Jun 2021 22:12:22 +0000 (23:12 +0100)]
Use html.Parse rather than html.ParseFragment (#16223)
* Use html.Parse rather than html.ParseFragment
There have been a few issues with html.ParseFragment - just use html.Parse instead.
* Skip document node
Signed-off-by: Andrew Thornton <art27@cantab.net>
KN4CK3R [Mon, 21 Jun 2021 18:34:58 +0000 (20:34 +0200)]
Update milestone counters on new issue. (#16183)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
zeripath [Mon, 21 Jun 2021 18:34:37 +0000 (19:34 +0100)]
Update documentation for Implicit TLS (#16220)
As per RFC 8314, it is now recommended to prefer TLS over STARTTLS.
Fix #16160
Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath [Mon, 21 Jun 2021 13:01:44 +0000 (14:01 +0100)]
reqOrgMembership calls need to be preceded by reqToken (#16198)
ReqOrgMembership calls need to be preceded by reqToken
Fix #16192
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
KN4CK3R [Mon, 21 Jun 2021 02:12:19 +0000 (04:12 +0200)]
Add tests for all webhooks (#16214)
* Added tests for MS Teams.
* Added tests for Dingtalk.
* Added tests for Telegram.
* Added tests for Feishu.
* Added tests for Discord.
* Added tests for closed issue and pullrequest comment.
* Added tests for Matrix.
* Trim all spaces.
* Added tests for Slack.
* Added JSONPayload tests.
* Added general tests.
* Replaced duplicated code.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
GiteaBot [Mon, 21 Jun 2021 00:11:34 +0000 (00:11 +0000)]
[skip ci] Updated translations via Crowdin
zeripath [Sun, 20 Jun 2021 22:39:12 +0000 (23:39 +0100)]
More efficiently parse shas for shaPostProcessor (#16101)
* More efficiently parse shas for shaPostProcessor
The shaPostProcessor currently repeatedly calls git rev-parse --verify on both backends
which is fine if there is only one thing that matches a sha - however if there are
multiple things then this becomes wildly inefficient.
This PR provides functions for both backends which are much faster to use.
Fix #16092
* Add ShaExistCache to RenderContext
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
zeripath [Sun, 20 Jun 2021 22:00:46 +0000 (23:00 +0100)]
Use git log name-status in get last commit (#16059)
* Improve get last commit using git log --name-status
git log --name-status -c provides information about the diff between a
commit and its parents. Using this and adjusting the algorithm to use
the first change to a path allows for a much faster generation of commit
info.
There is a subtle change in the results generated but this will cause
the results to more closely match those from elsewhere.
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
GiteaBot [Sun, 20 Jun 2021 00:11:36 +0000 (00:11 +0000)]
[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 19 Jun 2021 00:11:34 +0000 (00:11 +0000)]
[skip ci] Updated translations via Crowdin
parnic [Fri, 18 Jun 2021 22:08:22 +0000 (17:08 -0500)]
Reintroduce squash merge default comment as a config setting (#16134)
* Reinstate most of commit
09304db9a5d88c035a96f74a4544572bc8c5dac0
* Move the behaviour behind a config setting
* Also fix the initial #12365
6543 [Fri, 18 Jun 2021 17:00:53 +0000 (19:00 +0200)]
Remove User.GetOrganizations() (#14032)
as title
6543 [Fri, 18 Jun 2021 15:54:08 +0000 (17:54 +0200)]
Changelog v1.14.3 (#16131) (#16196)
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>
6543 [Fri, 18 Jun 2021 14:46:22 +0000 (16:46 +0200)]
fix TestAPIRepoTransfer (#16189)
GiteaBot [Fri, 18 Jun 2021 00:12:01 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin
6543 [Thu, 17 Jun 2021 23:24:55 +0000 (01:24 +0200)]
Fix some API bugs (#16184)
* Repository object only count releases as releases (fix #16144)
* EditOrg respect RepoAdminChangeTeamAccess option (fix #16013)
KN4CK3R [Thu, 17 Jun 2021 21:56:46 +0000 (23:56 +0200)]
Add asymmetric JWT signing (#16010)
* Added asymmetric token signing.
* Load signing key from settings.
* Added optional kid parameter.
* Updated documentation.
* Add "kid" to token header.
6543 [Thu, 17 Jun 2021 16:04:10 +0000 (18:04 +0200)]
[API] Add repoCreateTag (#16165)
* Add API CreateTag
* Add Test
* API: expose Tag Message
Mura Li [Thu, 17 Jun 2021 14:55:16 +0000 (22:55 +0800)]
Speed up git diff highlight generation (#16180)
Co-authored-by: Mura Li <typeless@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
6543 [Thu, 17 Jun 2021 14:02:34 +0000 (16:02 +0200)]
[API] expose repo.GetReviewers() & repo.GetAssignees() (#16168)
* API: expose repo.GetReviewers() & repo.GetAssignees()
* Add tests
* fix unrelated swagger query type
zeripath [Thu, 17 Jun 2021 10:35:05 +0000 (11:35 +0100)]
Run processors on whole of text (#16155)
There is an inefficiency in the design of our processors which means that Emoji
and other processors run in order n^2 time.
This PR forces the processors to process the entirety of text node before passing
back up. The fundamental inefficiency remains but it should be significantly
ameliorated.
Signed-off-by: Andrew Thornton <art27@cantab.net>
6543 [Thu, 17 Jun 2021 08:58:10 +0000 (10:58 +0200)]
[API] ListReleases add filter for draft and pre-releases (#16175)
* invent ctx.QueryOptionalBool
* [API] ListReleases add draft and pre-release filter
* Add X-Total-Count header
* Add a release to fixtures
* Add TEST for API ListReleases
6543 [Thu, 17 Jun 2021 07:17:35 +0000 (09:17 +0200)]
[API] User expose counters (#16167)
6543 [Thu, 17 Jun 2021 06:40:59 +0000 (08:40 +0200)]
[API] Issue Search Add filter for MilestoneNames (#16173)
GiteaBot [Thu, 17 Jun 2021 00:11:43 +0000 (00:11 +0000)]
[skip ci] Updated translations via Crowdin
zeripath [Wed, 16 Jun 2021 23:32:57 +0000 (00:32 +0100)]
Ensure settings for Service and Mailer are read on the install page (#15943)
* Ensure settings for Service and Mailer are read on the install page
NewContext does not set the mailer or service settings so add
a new function that will run this.
Fix #15894
Signed-off-by: Andrew Thornton <art27@cantab.net>
* placate lint
Signed-off-by: Andrew Thornton <art27@cantab.net>
6543 [Wed, 16 Jun 2021 22:33:37 +0000 (00:33 +0200)]
[API] ListIssues add more filters (#16174)
* [API] ListIssues add more filters:
optional filter repo issues by:
- since
- before
- created_by
- assigned_by
- mentioned_by
* Add Tests
* Update routers/api/v1/repo/issue.go
Co-authored-by: Lanre Adelowo <adelowomailbox@gmail.com>
* Apply suggestions from code review
Co-authored-by: Lanre Adelowo <adelowomailbox@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
zeripath [Wed, 16 Jun 2021 22:19:20 +0000 (23:19 +0100)]
Clean-up the settings hierarchy for issue_indexer queue (#16001)
There are a couple of settings in `[indexer]` relating to the `issue_indexer` queue
which override settings in unpredictable ways. This PR adjusts this hierarchy and makes
explicit that these settings are deprecated.
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
zeripath [Wed, 16 Jun 2021 22:16:47 +0000 (23:16 +0100)]
Fix missing discard in repo_language_stats (#16030)
Set the missing discard(1) in repo_language_stats.
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
zeripath [Wed, 16 Jun 2021 22:02:24 +0000 (23:02 +0100)]
Add Status Updates whilst Gitea migrations are occurring (#15076)
* Add migrating message
Signed-off-by: Andrew Thornton <art27@cantab.net>
* simplify messenger
Signed-off-by: Andrew Thornton <art27@cantab.net>
* make messenger an interface
Signed-off-by: Andrew Thornton <art27@cantab.net>
* rename
Signed-off-by: Andrew Thornton <art27@cantab.net>
* prepare for merge
Signed-off-by: Andrew Thornton <art27@cantab.net>
* as per tech
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Jonathan Tran [Wed, 16 Jun 2021 21:56:43 +0000 (17:56 -0400)]
Fix spelling (#16179)
Co-authored-by: Jonathan Tran <jon@allspice.io>
6543 [Wed, 16 Jun 2021 17:04:37 +0000 (19:04 +0200)]
Add subject-type filter to list notification API endpoints (#16177)
Close #15886
zeripath [Wed, 16 Jun 2021 01:02:03 +0000 (02:02 +0100)]
issue-keyword class is being incorrectly stripped off spans (#16163)
Bluemonday sanitizer regexp rules are not additive, so the addition of the icons,
emojis and chroma syntax policy has led to this being stripped.
Signed-off-by: Andrew Thornton <art27@cantab.net>
GiteaBot [Wed, 16 Jun 2021 00:11:33 +0000 (00:11 +0000)]
[skip ci] Updated translations via Crowdin
zeripath [Tue, 15 Jun 2021 22:29:25 +0000 (23:29 +0100)]
Only check access tokens if they are likely to be tokens (#16164)
* Only check access tokens if they are likely to be tokens
Gitea will currently check every if every password is an access token even though
most passwords are not and cannot be access tokens.
By creation access tokens are 40 byte hexadecimal strings therefore only these should
be checked.
Signed-off-by: Andrew Thornton <art27@cantab.net>
Steven [Tue, 15 Jun 2021 19:16:18 +0000 (21:16 +0200)]
Update MAINTAINERS (#16162)
koalp [Tue, 15 Jun 2021 01:15:56 +0000 (03:15 +0200)]
Use milestone deadline when sorting issues (#14551)
When sorting issues by deadline, the deadline of the milestone the issue
is attached to wasn't taken into account.
It have been changed and the nearest deadline is taken into account for
sorting.
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
zeripath [Tue, 15 Jun 2021 01:15:12 +0000 (02:15 +0100)]
Make command in authorized keys a template (#16003)
Fix #15595
Replaces #15978
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
KN4CK3R [Tue, 15 Jun 2021 01:12:33 +0000 (03:12 +0200)]
Add attachments for PR reviews (#16075)
* First step for multiple dropzones per page.
* Allow attachments on review comments.
* Lint.
* Fixed accidental initialize of the review textarea.
* Initialize SimpleMDE textarea.
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
GiteaBot [Tue, 15 Jun 2021 00:11:35 +0000 (00:11 +0000)]
[skip ci] Updated translations via Crowdin
KN4CK3R [Mon, 14 Jun 2021 20:42:58 +0000 (22:42 +0200)]
Fixed setting of wrong position (#16148)
zeripath [Mon, 14 Jun 2021 19:07:49 +0000 (20:07 +0100)]
v180 migration should be standalone (#16151)
Unfortunately the v180 migration picked up a few non-standalone dependencies. This PR
forcibly copies the important parts back into the migration.
Fix #16150
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Nils Dralle [Mon, 14 Jun 2021 18:30:35 +0000 (20:30 +0200)]
Fix private repo permission problem (#16142)
* Change user access permission
* Add string 'transfer_notices_3'
* Add 3rd transfer note to transfer dialog
* Add test
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
KN4CK3R [Mon, 14 Jun 2021 17:20:43 +0000 (19:20 +0200)]
Add push to remote mirror repository (#15157)
* Added push mirror model.
* Integrated push mirror into queue.
* Moved methods into own file.
* Added basic implementation.
* Mirror wiki too.
* Removed duplicated method.
* Get url for different remotes.
* Added migration.
* Unified remote url access.
* Add/Remove push mirror remotes.
* Prevent hangs with missing credentials.
* Moved code between files.
* Changed sanitizer interface.
* Added push mirror backend methods.
* Only update the mirror remote.
* Limit refs on push.
* Added UI part.
* Added missing table.
* Delete mirror if repository gets removed.
* Changed signature. Handle object errors.
* Added upload method.
* Added "upload" unit tests.
* Added transfer adapter unit tests.
* Send correct headers.
* Added pushing of LFS objects.
* Added more logging.
* Simpler body handling.
* Process files in batches to reduce HTTP calls.
* Added created timestamp.
* Fixed invalid column name.
* Changed name to prevent xorm auto setting.
* Remove table header im empty.
* Strip exit code from error message.
* Added docs page about mirroring.
* Fixed date.
* Fixed merge errors.
* Moved test to integrations.
* Added push mirror test.
* Added test.
Lunny Xiao [Mon, 14 Jun 2021 12:18:09 +0000 (20:18 +0800)]
Improve performance of dashboard list orgs (#16099)
* Improve performance of dashboard list orgs
* Fix wrong error description
* unexport queryUserOrgIDs method
* SimpleOrg -> MinimalOrg
* .
Co-authored-by: 6543 <6543@obermui.de>
KN4CK3R [Mon, 14 Jun 2021 10:33:16 +0000 (12:33 +0200)]
Add OpenID claims "profile" and "email". (#16141)
* Added OpenID claims "profile" and "email".
* Splitted error.
* Added scopes_supported and claims_supported.
* Added more metadata.
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
KN4CK3R [Mon, 14 Jun 2021 03:06:52 +0000 (05:06 +0200)]
Fixed sanitize errors. (#15240)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Lunny Xiao [Mon, 14 Jun 2021 02:22:55 +0000 (10:22 +0800)]
Add a new table issue_index to store the max issue index so that issue could be deleted with no duplicated index (#15599)
* Add a new table issue_index to store the max issue index so that issue could be deleted with no duplicated index
* Fix pull index
* Add tests for concurrent creating issues
* Fix lint
* Fix tests
* Fix postgres test
* Add test for migration v180
* Rename wrong test file name
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
a1012112796 [Sun, 13 Jun 2021 14:59:19 +0000 (22:59 +0800)]
small refactor for retry downloader (#16137)
Signed-off-by: a1012112796 <1012112796@qq.com>
GiteaBot [Sun, 13 Jun 2021 00:11:23 +0000 (00:11 +0000)]
[skip ci] Updated licenses and gitignores
Andrei Yankovich [Fri, 11 Jun 2021 18:51:05 +0000 (21:51 +0300)]
Removable media support (#16136)
Add support removable media for snap version of gitia.
for get more info about removable media interface see the snapcraft [documentation](https://snapcraft.io/docs/removable-media-interface)
zeripath [Thu, 10 Jun 2021 21:25:25 +0000 (22:25 +0100)]
Set self-adjusting deadline for connection writing (#16068)
* Set self-adjusting deadline for connection writing
In #16055 it appears that the simple 5s deadline doesn't work for large
file writes. Now we can't - or at least shouldn't just set no deadline
as go will happily let these connections block indefinitely. However,
what seems reasonable is to set some minimum rate we expect for writing.
This PR suggests the following algorithm:
* Every write has a minimum timeout of 5s (adjustable at compile time.)
* If there has been a previous write - then consider its previous
deadline, add half of the minimum timeout + 2s per kb about to written.
* If that new deadline is after the minimum timeout use that.
Fix #16055
* Linearly increase timeout
* Make PerWriteTimeout, PerWritePerKbTimeouts configurable
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
6543 [Thu, 10 Jun 2021 14:44:25 +0000 (16:44 +0200)]
Vendor Update (#16121)
* update github.com/PuerkitoBio/goquery
* update github.com/alecthomas/chroma
* update github.com/blevesearch/bleve/v2
* update github.com/caddyserver/certmagic
* update github.com/go-enry/go-enry/v2
* update github.com/go-git/go-billy/v5
* update github.com/go-git/go-git/v5
* update github.com/go-redis/redis/v8
* update github.com/go-testfixtures/testfixtures/v3
* update github.com/jaytaylor/html2text
* update github.com/json-iterator/go
* update github.com/klauspost/compress
* update github.com/markbates/goth
* update github.com/mattn/go-isatty
* update github.com/mholt/archiver/v3
* update github.com/microcosm-cc/bluemonday
* update github.com/minio/minio-go/v7
* update github.com/prometheus/client_golang
* update github.com/unrolled/render
* update github.com/xanzy/go-gitlab
* update github.com/yuin/goldmark
* update github.com/yuin/goldmark-highlighting
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Lunny Xiao [Thu, 10 Jun 2021 08:52:37 +0000 (16:52 +0800)]
Remove utf8 option from installation page (#16126)
GiteaBot [Thu, 10 Jun 2021 00:11:49 +0000 (00:11 +0000)]
[skip ci] Updated translations via Crowdin
Lunny Xiao [Thu, 10 Jun 2021 00:08:19 +0000 (08:08 +0800)]
Fix bug on getIssueIDsByRepoID (#16119)
* Fix bug on getIssueIDsByRepoID
* Add test
Lunny Xiao [Wed, 9 Jun 2021 19:52:55 +0000 (03:52 +0800)]
Remove unnecessary goroutine (#16080)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Lunny Xiao [Wed, 9 Jun 2021 17:53:16 +0000 (01:53 +0800)]
Add sso.Group, context.Auth, context.APIAuth to allow auth special routes (#16086)
* Add sso.Group, context.Auth, context.APIAuth to allow auth special routes
* Remove unnecessary check
* Rename sso -> auth
* remove unused method of Auth interface
Lunny Xiao [Wed, 9 Jun 2021 12:53:12 +0000 (20:53 +0800)]
Fix http path bug (#16117)
* Fix http path bug
* Add missed request
* add tests
Co-authored-by: 6543 <6543@obermui.de>
Lunny Xiao [Tue, 8 Jun 2021 23:33:54 +0000 (07:33 +0800)]
Refactor routers directory (#15800)
* refactor routers directory
* move func used for web and api to common
* make corsHandler a function to prohibit side efects
* rm unused func
Co-authored-by: 6543 <6543@obermui.de>
zeripath [Tue, 8 Jun 2021 17:46:13 +0000 (18:46 +0100)]
Remove spurious AppSubUrl in serviceworker request. (#16047)
There is another spurious AppSubUrl placement in the serviceworker registration.
This PR removes it.
Signed-off-by: Andrew Thornton <art27@cantab.net>
Lunny Xiao [Tue, 8 Jun 2021 04:36:23 +0000 (12:36 +0800)]
Fix `doctor --run check-db-consistency --fix` with label fix (#16094)
* Add doctor for wrong label and issue_label data
* Fix labels and issue labels check
* Remove unnecessary functions
Lunny Xiao [Tue, 8 Jun 2021 03:52:51 +0000 (11:52 +0800)]
Always store primary email address into email_address table and also the state (#15956)
* Always store primary email address into email_address table and also the state
* Add lower_email to not convert email to lower as what's added
* Fix fixture
* Fix tests
* Use BeforeInsert to save lower email
* Fix v180 migration
* fix tests
* Fix test
* Remove wrong submited codes
* Fix test
* Fix test
* Fix test
* Add test for v181 migration
* remove change user's email to lower
* Revert change on user's email column
* Fix lower email
* Fix test
* Fix test
KN4CK3R [Mon, 7 Jun 2021 16:55:26 +0000 (18:55 +0200)]
Fix data URI scramble (#16098)
* Removed unused method.
* No prefix for data uris.
* Added test to prevent regressions.
Lunny Xiao [Mon, 7 Jun 2021 14:52:59 +0000 (22:52 +0800)]
Merge all deleteBranch as one function and also fix bug when delete branch don't close related PRs (#16067)
* Fix bug when delete branch don't close related PRs
* Merge all deletebranch as one method
* Add missed branch.go
* fix comment
Co-authored-by: Lauris BH <lauris@nix.lv>
KN4CK3R [Mon, 7 Jun 2021 05:27:09 +0000 (07:27 +0200)]
Fixed assert statements. (#16089)
zeripath [Sun, 6 Jun 2021 23:44:58 +0000 (00:44 +0100)]
Make commit info cancelable (#16032)
* Make modules/context.Context a context.Context
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Simplify context calls
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Set the base context for requests to the HammerContext
Signed-off-by: Andrew Thornton <art27@cantab.net>
* pass context into get-last-commit
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Make commit_info cancellable
Signed-off-by: Andrew Thornton <art27@cantab.net>
* use context as context
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Lunny Xiao [Sun, 6 Jun 2021 22:50:07 +0000 (06:50 +0800)]
Fix regression of renderer (#16091)
* Fix regression of renderer
* Fix render setting load twice bug
GiteaBot [Sun, 6 Jun 2021 00:11:36 +0000 (00:11 +0000)]
[skip ci] Updated translations via Crowdin
KN4CK3R [Sat, 5 Jun 2021 23:59:27 +0000 (01:59 +0200)]
Rewrite of the LFS server (#15523)
* Restructured code. Moved static checks out of loop.
* Restructured batch api. Add support for individual errors.
* Let router decide if LFS is enabled.
* Renamed methods.
* Return correct status from verify handler.
* Unified media type check in router.
* Changed error code according to spec.
* Moved checks into router.
* Removed invalid v1 api methods.
* Unified methods.
* Display better error messages.
* Added size parameter. Create meta object on upload.
* Use object error on invalid size.
* Skip upload if object exists.
* Moved methods.
* Suppress fields in response.
* Changed error on accept.
* Added tests.
* Use ErrorResponse object.
* Test against message property.
* Add support for the old invalid lfs client.
* Fixed the check because MinIO wraps the error.
* Use individual repositories.
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
Steven [Sat, 5 Jun 2021 22:04:56 +0000 (00:04 +0200)]
Change default TMPDIR path in rootless containers (#16077)
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
zeripath [Sat, 5 Jun 2021 14:23:22 +0000 (15:23 +0100)]
Fix panic (#16072)
There is an incorrect casting in the wrapped queue.
Fix #16071
Signed-off-by: Andrew Thornton <art27@cantab.net>
NekoBit [Sat, 5 Jun 2021 13:33:34 +0000 (09:33 -0400)]
Fix typo and add TODO notice (#16064)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
KN4CK3R [Sat, 5 Jun 2021 12:32:19 +0000 (14:32 +0200)]
Add Image Diff for SVG files (#14867)
* Added type sniffer.
* Switched content detection from base to typesniffer.
* Added GuessContentType to Blob.
* Moved image info logic to client.
Added support for SVG images in diff.
* Restore old blocked svg behaviour.
* Added missing image formats.
* Execute image diff only when container is visible.
* add margin to spinner
* improve BIN tag on image diffs
* Default to render view.
* Show image diff on incomplete diff.
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Lunny Xiao [Fri, 4 Jun 2021 13:14:20 +0000 (21:14 +0800)]
Copy git data from disk when restore repository (#16066)
GiteaBot [Fri, 4 Jun 2021 00:11:34 +0000 (00:11 +0000)]
[skip ci] Updated translations via Crowdin
KN4CK3R [Thu, 3 Jun 2021 22:50:31 +0000 (00:50 +0200)]
Fixed unknown translation key. (#16057)
GiteaBot [Thu, 3 Jun 2021 00:11:34 +0000 (00:11 +0000)]
[skip ci] Updated translations via Crowdin