]> source.dussan.org Git - gitea.git/log
gitea.git
3 years agoadd pat-s to MAINTAINERS list (#15007)
Patrick Schratz [Tue, 16 Mar 2021 14:37:04 +0000 (15:37 +0100)]
add pat-s to MAINTAINERS list (#15007)

3 years agoEnsure that new pull request button works on forked forks owned by owner of the root...
zeripath [Tue, 16 Mar 2021 01:36:34 +0000 (01:36 +0000)]
Ensure that new pull request button works on forked forks owned by owner of the root (#14932)

Prevent 404 on new pull request button on forked fork owned by the owner
of the root repository. Also ensure that the names make sense.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoMove repo.CloseIssuesViaCommitInAnyBranch to issue settings (#14965)
Norwin [Tue, 16 Mar 2021 01:00:52 +0000 (01:00 +0000)]
Move repo.CloseIssuesViaCommitInAnyBranch to issue settings (#14965)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 16 Mar 2021 00:12:50 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoFix several render issues (#14986)
zeripath [Mon, 15 Mar 2021 23:20:05 +0000 (23:20 +0000)]
Fix several render issues (#14986)

* Fix an issue with panics related to attributes
* Wrap goldmark render in a recovery function
* Reduce memory use in render emoji
* Use a pipe for rendering goldmark - still needs more work and a limiter

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoAdd reverse proxy configuration support for remote IP address (#14959)
Lauris BH [Mon, 15 Mar 2021 22:27:28 +0000 (00:27 +0200)]
Add reverse proxy configuration support for remote IP address (#14959)

* Add reverse proxy configuration support for remote IP address validation

* Trust all IP addresses in containerized environments by default

* Use single option to specify networks and proxy IP addresses. By default trust all loopback IPs

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoEnsure validation occurs on clone addresses too (#14994)
zeripath [Mon, 15 Mar 2021 21:52:11 +0000 (21:52 +0000)]
Ensure validation occurs on clone addresses too (#14994)

* Ensure validation occurs on clone addresses too

Fix #14984

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

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

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix api tests

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoUpdate comparison docs for gitlab (#14999)
tuxmaster5000 [Mon, 15 Mar 2021 15:19:00 +0000 (16:19 +0100)]
Update comparison docs for gitlab (#14999)

3 years agoUpdate go-enry to v2.6.1 (#14997)
Lauris BH [Mon, 15 Mar 2021 03:20:02 +0000 (05:20 +0200)]
Update go-enry to v2.6.1 (#14997)

Co-authored-by: Gitea <gitea@gitea.io>
3 years agoFix repo page language stat span color (#14993)
Mike L [Sun, 14 Mar 2021 20:27:58 +0000 (21:27 +0100)]
Fix repo page language stat span color (#14993)

Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agochore(models): rewrite code format. (#14754)
Bo-Yi Wu [Sun, 14 Mar 2021 18:52:12 +0000 (02:52 +0800)]
chore(models): rewrite code format. (#14754)

* chore: rewrite format.

* chore: update format

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* chore: update format

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* chore: Adjacent parameters with the same type should be grouped together

* chore: update format.

3 years agoMake sure sibling images get a link too (#14979)
zeripath [Sun, 14 Mar 2021 16:36:51 +0000 (16:36 +0000)]
Make sure sibling images get a link too (#14979)

* Make sure sibling images get a link too

Due a problem with the ast.Walker in the our transformer in goldmark
an image with a sibling image will not be transformed to gain a parent
link. This PR fixes this.

Fix #12925

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoDo not show full lfs file on error in git_test.go:rawTest() (#14980)
zeripath [Sun, 14 Mar 2021 15:53:59 +0000 (15:53 +0000)]
Do not show full lfs file on error in git_test.go:rawTest() (#14980)

If there is a problem uploading to LFS it is possible for the raw
endpoint to return a very large file when a pointer file is expected
This will then cause the drone logs to fill up unnecessarily with
the contents of the very large file.

If the file returned from raw is of the incorrect size we should
therefore not test it see if it contains the pointer file
and just declare that it is incorrect.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoRe-enable listing of forks when logged out (#14992)
Mike L [Sun, 14 Mar 2021 14:48:28 +0000 (15:48 +0100)]
Re-enable listing of forks when logged out (#14992)

* Re-enable listing of forks when logged out

* Further improvements on repo button logic

3 years ago[skip ci] Updated licenses and gitignores
GiteaBot [Sun, 14 Mar 2021 00:12:26 +0000 (00:12 +0000)]
[skip ci] Updated licenses and gitignores

3 years agoAPI: fix set milestone on PR creation (#14981)
Norwin [Sat, 13 Mar 2021 18:06:52 +0000 (18:06 +0000)]
API: fix set milestone on PR creation (#14981)

* API: fix set milestone on PR creation

pr creation via API failed with 404, because we searched
for milestoneID 0, due to uninitialized var usage D:

* add tests

* fix expected status codes

* fix tests

Co-authored-by: 6543 <6543@obermui.de>
3 years agoFix spacing of issue/pulls list review status icons (#14985)
Mike L [Sat, 13 Mar 2021 13:37:09 +0000 (14:37 +0100)]
Fix spacing of issue/pulls list review status icons (#14985)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 13 Mar 2021 00:12:41 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agofix release mail html template (#14975)
Norwin [Fri, 12 Mar 2021 21:47:52 +0000 (21:47 +0000)]
fix release mail html template (#14975)

was missing an </a>

3 years agocheck if original author is set (#14971)
Norwin [Fri, 12 Mar 2021 21:01:33 +0000 (21:01 +0000)]
check if original author is set (#14971)

Co-authored-by: zeripath <art27@cantab.net>
3 years agoFix Anchor jumping with escaped query components (#14969)
zeripath [Fri, 12 Mar 2021 18:59:13 +0000 (18:59 +0000)]
Fix Anchor jumping with escaped query components (#14969)

Fix #14968

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoNever add labels not from this repository or organisation and remove org labels on...
zeripath [Fri, 12 Mar 2021 17:45:49 +0000 (17:45 +0000)]
Never add labels not from this repository or organisation and remove org labels on transfer (#14928)

* Never add labels not from this repository or organisation and remove org labels on transfer

Prevent the addition of labels from outside of the repository or
organisation and remove organisation labels on transfer.

Related #14908

* switch to use sql

* subquery alias

* once more around the merry go round

* fix api problem

3 years agoFix excluding more than two labels on issues list (#14962)
zeripath [Fri, 12 Mar 2021 16:07:23 +0000 (16:07 +0000)]
Fix excluding more than two labels on issues list (#14962)

* Fix excluding more than two labels on issues list

Fix #14840

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

* fix multiple-label filter on milestone issuelist

* Apply suggestions from code review

Co-authored-by: jaqra <48099350+jaqra@users.noreply.github.com>
* Update web_src/js/index.js

Co-authored-by: Norwin Roosen <git@nroo.de>
Co-authored-by: jaqra <48099350+jaqra@users.noreply.github.com>
3 years agodon't show project cog in issue sidebar if no permission (#14953)
Norwin [Fri, 12 Mar 2021 15:14:02 +0000 (15:14 +0000)]
don't show project cog in issue sidebar if no permission (#14953)

3 years agoPrevent incorrect HTML escaping in swagger.json (#14957)
zeripath [Fri, 12 Mar 2021 04:43:04 +0000 (04:43 +0000)]
Prevent incorrect HTML escaping in swagger.json (#14957)

* Prevent incorrect HTML escaping in swagger.json

Fix #14706

Signed-off-by: Andrew Thornton <art27@cantab.net>
* oops add it to the helper

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

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoShow correct issues for team dashboard (#14952)
Norwin [Fri, 12 Mar 2021 03:06:33 +0000 (03:06 +0000)]
Show correct issues for team dashboard (#14952)

* fix no items under /org/$org/{issues,pulls}?type=mentioned

it was filtering by org id, but org-mentions are not persisted like that
to the DB, we need to filter by UID.
This means, selecting different teams will only have an effect on the
selected repos, otherwise results will be the same, which may be
suboptimal.

fixes #14941

* don't spam a warning for a perfectly fine request

3 years agoCI: pre install git last verson and git lfs in test (#14681)
a1012112796 [Fri, 12 Mar 2021 02:04:43 +0000 (10:04 +0800)]
CI: pre install git last verson and git lfs in test (#14681)

link:
https://hub.docker.com/r/gitea/test_env
Source:
https://gitea.com/gitea/test_env/src/branch/master/Dockerfile

Signed-off-by: a1012112796 <1012112796@qq.com>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 12 Mar 2021 00:12:35 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoAdd kdumontnu to MAINTAINERS (#14964)
Kyle D [Thu, 11 Mar 2021 22:25:07 +0000 (15:25 -0700)]
Add kdumontnu to MAINTAINERS (#14964)

3 years agoPrevent panic when editing forked repos by API (#14960)
zeripath [Thu, 11 Mar 2021 18:09:52 +0000 (18:09 +0000)]
Prevent panic when editing forked repos by API (#14960)

When editing forked repos using the API the BaseRepository needs to loaded
in order to check its visibility otherwise there will be NPE panic.

Fix #14956

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoAdd ui.explore settings to control view of explore pages (2) (#14094)
zeripath [Thu, 11 Mar 2021 13:40:54 +0000 (13:40 +0000)]
Add ui.explore settings to control view of explore pages (2) (#14094)

This is an alternative PR to #13687.

Add `[ui.explore]` settings to allow restricting the
explore pages to logged in users only and to disable the users explore page.

The two proposed settings are:

- `REQUIRE_SIGNIN_VIEW`: Only allows access to the explore pages if the
user is signed in. Also restricts
  - `/api/v1/user/search`
  - `/api/v1/users/{username}`
  - `/api/v1/users/{username}/repos`
  - but does not restrict `/api/v1/users/{username}/heatmap`
- `DISABLE_USERS_PAGE`: Disables the /explore/users page

Fix #2908

Close #13687

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoUse correct default value (#14949)
KN4CK3R [Thu, 11 Mar 2021 05:09:30 +0000 (06:09 +0100)]
Use correct default value (#14949)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agobuild darwin on arm64 platforms (#14951)
techknowlogick [Thu, 11 Mar 2021 04:59:57 +0000 (23:59 -0500)]
build darwin on arm64 platforms (#14951)

fix #14945

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 11 Mar 2021 00:12:39 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 10 Mar 2021 00:12:39 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoFix typo in .golangci.yml (#14933)
Ikko Ashimine [Tue, 9 Mar 2021 08:38:18 +0000 (17:38 +0900)]
Fix typo in .golangci.yml (#14933)

occured -> occurred

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 9 Mar 2021 00:12:38 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years ago[API] get pull, return head branch sha, even if deleted (#14931)
6543 [Mon, 8 Mar 2021 20:48:31 +0000 (21:48 +0100)]
[API] get pull, return head branch sha, even if deleted (#14931)

* API: return head branch sha, even if deleted

* relax if ref not resolvable

3 years agoMove Workaround for #12675 into it's own function (#14922)
6543 [Mon, 8 Mar 2021 19:00:19 +0000 (20:00 +0100)]
Move Workaround for #12675 into it's own function (#14922)

* Move Workatround for #12675 into it's own function

* use more reliable solution (as tea do)

3 years agoMinor UI fixes (#14926)
Norwin [Mon, 8 Mar 2021 17:55:37 +0000 (17:55 +0000)]
Minor UI fixes (#14926)

* disable fork button when not signed in

* fix commit body styling on PR page

* fixup! fix commit body styling on PR page

3 years agoAdd "captcha" to list of reserved usernames (#14929)
fnetX (aka fralix) [Mon, 8 Mar 2021 16:49:29 +0000 (17:49 +0100)]
Add "captcha" to list of reserved usernames (#14929)

Signed-off-by: Otto Richter <git@fralix.ovh>
3 years agoFix alignment of People and Teams right arrow on org homepage (#14924)
zeripath [Mon, 8 Mar 2021 14:52:58 +0000 (14:52 +0000)]
Fix alignment of People and Teams right arrow on org homepage (#14924)

Fix #14854

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoRe-enable import local paths after reversion from #13610 (#14925)
zeripath [Mon, 8 Mar 2021 13:10:17 +0000 (13:10 +0000)]
Re-enable import local paths after reversion from #13610 (#14925)

PR #13610 unfortunately disabled importing repositories from local paths.
This PR restores this functionality.

Fix #14700

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoMake internal SSH server host key path configurable (#14918)
zeripath [Mon, 8 Mar 2021 02:43:59 +0000 (02:43 +0000)]
Make internal SSH server host key path configurable (#14918)

* Make SSH server host key path configurable

* make it possible to have multiple keys

* Make gitea.rsa the default key

* Add some more logging

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix overdue marking of closed issues and milestones (#14923)
zeripath [Mon, 8 Mar 2021 01:55:57 +0000 (01:55 +0000)]
Fix overdue marking of closed issues and milestones (#14923)

Closed milestones and issues should only be marked overdue if they were
closed after their deadline.

Fix: #14536

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 8 Mar 2021 00:12:25 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoChangelog v1.13.4 (#14917) (#14920)
6543 [Sun, 7 Mar 2021 23:07:02 +0000 (00:07 +0100)]
Changelog v1.13.4 (#14917) (#14920)

3 years agodocs: swagger show models by default (#14880)
Norwin [Sun, 7 Mar 2021 21:19:14 +0000 (21:19 +0000)]
docs: swagger show models by default (#14880)

3 years agoFix migration context data (#14910)
KN4CK3R [Sun, 7 Mar 2021 19:21:09 +0000 (20:21 +0100)]
Fix migration context data (#14910)

* Unified context data.

* Changed method name.

3 years agoAdd SameSite setting for cookies (#14900)
zeripath [Sun, 7 Mar 2021 08:12:43 +0000 (08:12 +0000)]
Add SameSite setting for cookies (#14900)

Add SameSite setting for cookies and rationalise the cookie setting code. Switches SameSite to Lax by default.

There is a possible future extension of differentiating which cookies could be set at Strict by default but that is for a future PR.

Fix #5583

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoPrevent panic when empty MilestoneID in repo/issue/list (#14911)
zeripath [Sun, 7 Mar 2021 02:25:54 +0000 (02:25 +0000)]
Prevent panic when empty MilestoneID in repo/issue/list (#14911)

This PR adds a simple check to only test the MilestoneID if it is not empty.

Fix #14906

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years ago[skip ci] Updated licenses and gitignores
GiteaBot [Sun, 7 Mar 2021 00:12:31 +0000 (00:12 +0000)]
[skip ci] Updated licenses and gitignores

3 years agoFix race in LFS ContentStore.Put(...) (#14895)
zeripath [Sat, 6 Mar 2021 20:21:56 +0000 (20:21 +0000)]
Fix race in LFS ContentStore.Put(...) (#14895)

Continuing on from #14888

The previous implementation has race whereby an incomplete upload or
hash mismatch upload can end up in the ContentStore. This PR moves the
validation into the reader so that if there is a hash error or size
mismatch the reader will return with an error instead of an io.EOF
causing the storage to abort the storage.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix issue search with db indexer because of mysql 5.7 sqlmode (#14907)
Lunny Xiao [Sat, 6 Mar 2021 15:11:12 +0000 (23:11 +0800)]
Fix issue search with db indexer because of mysql 5.7 sqlmode (#14907)

* Fix sqlmode bug

* distinct is necessary

3 years agoHide resync all ssh principals when using internal ssh server (#14904)
Lunny Xiao [Sat, 6 Mar 2021 07:32:08 +0000 (15:32 +0800)]
Hide resync all ssh principals when using internal ssh server (#14904)

Co-authored-by: 6543 <6543@obermui.de>
3 years agoFix a couple of issues with a feeds (#14897)
zeripath [Sat, 6 Mar 2021 04:09:49 +0000 (04:09 +0000)]
Fix a couple of issues with a feeds (#14897)

@CirnoT spotted a couple of issues with feeds on discord.

This PR fixes both of these.

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 6 Mar 2021 00:12:35 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoSigned-off-by: jolheiser <john.olheiser@gmail.com> (#14898)
John Olheiser [Fri, 5 Mar 2021 21:00:15 +0000 (15:00 -0600)]
Signed-off-by: jolheiser <john.olheiser@gmail.com> (#14898)
3 years agoFix bug when combine label comments (#14894)
Lunny Xiao [Fri, 5 Mar 2021 15:17:32 +0000 (23:17 +0800)]
Fix bug when combine label comments (#14894)

* Fix bug when combine label comments

* Added some code comments

* More comments

3 years agoFix race in local storage (#14888)
zeripath [Fri, 5 Mar 2021 13:19:17 +0000 (13:19 +0000)]
Fix race in local storage (#14888)

LocalStorage should only put completed files in position

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoWhen transfering repository and database transaction failed, rollback the renames...
Lunny Xiao [Fri, 5 Mar 2021 02:28:52 +0000 (10:28 +0800)]
When transfering repository and database transaction failed, rollback the renames (#14864)

Fix #14821

Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoShow private heatmap on profile to self & admins (#14881)
Norwin [Thu, 4 Mar 2021 22:59:13 +0000 (22:59 +0000)]
Show private heatmap on profile to self & admins (#14881)

followup to #14080

3 years agoIsUserAllowedToUpdate ignore igonre if user is nil (#14885)
6543 [Thu, 4 Mar 2021 18:27:54 +0000 (19:27 +0100)]
IsUserAllowedToUpdate ignore igonre if user is nil (#14885)

3 years ago[Docs] Fix how lfs data path is set (#14855)
6543 [Thu, 4 Mar 2021 17:01:44 +0000 (18:01 +0100)]
[Docs] Fix how lfs data path is set (#14855)

* fix docs: lfs data path

* DEPRECATED note

* 已废弃

* better english sentence

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoAdd changelog for v1.13.3 (#14877) (#14883)
6543 [Thu, 4 Mar 2021 15:00:23 +0000 (16:00 +0100)]
Add changelog for v1.13.3 (#14877) (#14883)

* Add changelog for v1.13.3 (#14877)

Add changelog for v1.13.3

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <matti@mdranta.net>
* Update Docs

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <matti@mdranta.net>
3 years agoMake manual merge autodetection optional and add manual merge as merge method (#12543)
a1012112796 [Thu, 4 Mar 2021 03:41:23 +0000 (11:41 +0800)]
Make manual merge autodetection optional and add manual merge as merge method (#12543)

* Make auto check manual merge as a chooseable mod and add manual merge way on ui

as title, Before this pr, we use same way with GH to check manually merge.
It good, but in some special cases, misjudgments can occur. and it's hard
to fix this bug. So I add option to allow repo manager block "auto check manual merge"
function, Then it will have same style like gitlab(allow empty pr). and to compensate for
not being able to detect THE PR merge automatically, I added a manual approach.

Signed-off-by: a1012112796 <1012112796@qq.com>
* make swager

* api support

* ping ci

* fix TestPullCreate_EmptyChangesWithCommits

* Apply suggestions from code review

Co-authored-by: zeripath <art27@cantab.net>
* Apply review suggestions and add test

* Apply suggestions from code review

Co-authored-by: zeripath <art27@cantab.net>
* fix build

* test error message

* make fmt

* Fix indentation issues identified by @silverwind

Co-authored-by: silverwind <me@silverwind.io>
* Fix tests and make manually merged disabled error on API the same

Signed-off-by: Andrew Thornton <art27@cantab.net>
* a small nit

* fix wrong commit id error

* fix bug

* simple test

* fix test

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoMove Bleve and Elastic code indexers to use a common cat-file --batch (#14781)
zeripath [Thu, 4 Mar 2021 02:57:01 +0000 (02:57 +0000)]
Move Bleve and Elastic code indexers to use a common cat-file --batch (#14781)

* Extract out the common cat-file batch calls

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Move bleve and elastic indexers to use a common cat-file --batch when indexing

Signed-off-by: Andrew Thornton <art27@cantab.net>
* move catfilebatch to batch_reader and rename to batch_reader.go

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoAdd CORS config on to /login/oauth/access_token endpoint (#14850)
zeripath [Thu, 4 Mar 2021 01:25:30 +0000 (01:25 +0000)]
Add CORS config on to /login/oauth/access_token endpoint (#14850)

Fix #7204

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoFix paging of file commit logs (#14831)
zeripath [Thu, 4 Mar 2021 00:48:19 +0000 (00:48 +0000)]
Fix paging of file commit logs (#14831)

Unfortunately `git log revision ... --skip=x -- path` skips the number of commits
not the number of commits relating to the path.

This PR changes the function to have a reader that reads and skips the
necessary number of commits by hand instead.

Fix #8716

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoAdd missing repo.projects unit into swagger (#14876)
zeripath [Wed, 3 Mar 2021 22:44:30 +0000 (22:44 +0000)]
Add missing repo.projects unit into swagger (#14876)

Fix #14875

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 3 Mar 2021 00:12:35 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoHandle urls with trailing slash (#14852)
Norwin [Tue, 2 Mar 2021 16:23:36 +0000 (16:23 +0000)]
Handle urls with trailing slash (#14852)

3 years agoMake searching issues by keyword case insensitive on DB (#14848)
zeripath [Tue, 2 Mar 2021 13:07:01 +0000 (13:07 +0000)]
Make searching issues by keyword case insensitive on DB (#14848)

Most DBs apart from SQLite will use a default Collation that is not case insensitive.
This means that SearchIssuesByKeyword becomes case sensitive for db indexing - in
contrast to the bleve and elastic indexers.

This PR simply uses UPPER(...) to do the LIKE - and although it may be more efficient
to change collations this would be a non-trivial task.

Fix #13663

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

3 years agoMigrate to use jsoniter instead of encoding/json (#14841)
zeripath [Mon, 1 Mar 2021 21:08:10 +0000 (21:08 +0000)]
Migrate to use jsoniter instead of encoding/json (#14841)

* Migrate to use jsoniter

* fix tests

* update gitea.com/go-chi/binding

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoWhen Deleting Repository only explicitly close PRs whose base is not this repository...
zeripath [Mon, 1 Mar 2021 17:39:44 +0000 (17:39 +0000)]
When Deleting Repository only explicitly close PRs whose base is not this repository (#14823)

When Deleting Repository only explicitly close PRs whose base is not this repository

Fix #14775

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoOrganization removal confirmation using name not password (#14738)
Paweł Bogusławski [Mon, 1 Mar 2021 14:33:05 +0000 (15:33 +0100)]
Organization removal confirmation using name not password (#14738)

* Organization removal confirmation using name not password

Gitea is asking for user password to confirm organization
removal so this operation cannot be done in systems with
SSO authentication (where no user passwords are used).

This mod changes the way gitea confirms organization
removal - user must enter organization name (not user
password) to confirm operation (similar to repository
removal confirmation).

Author-Change-Id: IB#1107219

* Translation removed

Translation removed from PR - will be restored using Crowdin
after pull got merged.

Fixes: 95ddcdd8bd8097a952894556d42641d5ec269288
Related: https://github.com/go-gitea/gitea/pull/14738
Author-Change-Id: IB#1107219

3 years agoremove duplicate define of CheckAttribute() (#14837)
a1012112796 [Mon, 1 Mar 2021 12:14:17 +0000 (20:14 +0800)]
remove duplicate define of CheckAttribute() (#14837)

Signed-off-by: a1012112796 <1012112796@qq.com>
3 years agodrone workspace path
techknowlogick [Mon, 1 Mar 2021 04:57:58 +0000 (23:57 -0500)]
drone workspace path

3 years agodrone workspace base
techknowlogick [Mon, 1 Mar 2021 04:25:09 +0000 (23:25 -0500)]
drone workspace base

3 years agouse gomod support w/ xgo (#14836)
techknowlogick [Mon, 1 Mar 2021 03:43:55 +0000 (22:43 -0500)]
use gomod support w/ xgo (#14836)

3 years agoRepository transfer has to be confirmed, if user can not create repo for new owner...
6543 [Mon, 1 Mar 2021 00:47:30 +0000 (01:47 +0100)]
Repository transfer has to be confirmed, if user can not create repo for new owner (#14792)

* make repo as "pending transfer" if on transfer start doer has no right to create repo in new destination

* if new pending transfer ocured, create UI & Mail notifications

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 1 Mar 2021 00:12:52 +0000 (00:12 +0000)]
[skip ci] Updated translations via Crowdin

3 years agogo1.16 (#14783)
techknowlogick [Sun, 28 Feb 2021 23:08:33 +0000 (18:08 -0500)]
go1.16 (#14783)

3 years agoSet HCaptchaSiteKey on Link Account pages (#14834)
zeripath [Sun, 28 Feb 2021 22:04:15 +0000 (22:04 +0000)]
Set HCaptchaSiteKey on Link Account pages (#14834)

When using HCaptcha on link account pages the site key needs to be passed
in. This PR ensures that HCaptchaSiteKey is set in the data.

Fix #14766

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoCreate tag on ui (#13467)
a1012112796 [Sun, 28 Feb 2021 19:57:45 +0000 (03:57 +0800)]
Create tag on ui (#13467)

Support create single tag directly

support create tag with message from create release ui

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
3 years agoAll organization members should be assignable as reviewer (#14262)
Jimmy Praet [Sun, 28 Feb 2021 18:24:00 +0000 (19:24 +0100)]
All organization members should be assignable as reviewer (#14262)

For public repos, all organization members should be assignable as reviewer

Co-authored-by: zeripath <art27@cantab.net>
3 years agoadd preview support for wiki editor when disable simpleMDE (#14757)
a1012112796 [Sun, 28 Feb 2021 16:48:29 +0000 (00:48 +0800)]
add preview support for wiki editor when disable simpleMDE (#14757)

Signed-off-by: a1012112796 <1012112796@qq.com>
3 years agoFix issue/pul sidebar (#14826)
6543 [Sun, 28 Feb 2021 14:05:55 +0000 (15:05 +0100)]
Fix issue/pul sidebar (#14826)

3 years agoPrevent use of double sub-path and incorrect asset path in manifest (#14827)
zeripath [Sun, 28 Feb 2021 12:29:22 +0000 (12:29 +0000)]
Prevent use of double sub-path and incorrect asset path in manifest (#14827)

MakeAbsoluteAssetURL should just url join the static url prefix on to appurl
if it is not an absolute path - this is because StaticURLPrefix is an absolute
prefix not a relative prefix to the app sub url.

Fix #14422

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoRemove pt-pt from doc config file (#14830)
a1012112796 [Sun, 28 Feb 2021 10:46:21 +0000 (18:46 +0800)]
Remove pt-pt from doc config file (#14830)

Because it not has any content now. It's not necessary to
show this link on the footer.

Signed-off-by: a1012112796 <1012112796@qq.com>
3 years agoFix missleading sentence (#14829)
6543 [Sun, 28 Feb 2021 07:54:12 +0000 (08:54 +0100)]
Fix missleading sentence (#14829)

3 years ago[skip ci] Updated licenses and gitignores
GiteaBot [Sun, 28 Feb 2021 00:43:14 +0000 (00:43 +0000)]
[skip ci] Updated licenses and gitignores

3 years agoFix a couple of CommentAsPatch issues. (#14804)
zeripath [Sat, 27 Feb 2021 18:46:14 +0000 (18:46 +0000)]
Fix a couple of CommentAsPatch issues.  (#14804)

* CutDiffAroundLine makes the incorrect assumption that `---` and `+++` always represent part of the header of a diff.

This PR adds a flag to its parsing to prevent this problem and adds a streaming parsing technique to CutDiffAroundLine using an io.pipe instead of just sending data to an unbounded buffer.

Fix #14711

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Handle unquoted comment patch files

When making comment patches unfortunately the patch does not always quote the filename
This makes the diff --git header ambiguous again.

This PR finally adds handling for ambiguity in to parse patch

Fix #14812

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add in testing for no error

There is no way currently for CutDiffAroundLine in this test to cause an
error however, it should still be tested.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoAdd Image Diff options in Pull Request Diff view (#14450)
KN4CK3R [Sat, 27 Feb 2021 17:25:00 +0000 (18:25 +0100)]
Add Image Diff options in Pull Request Diff view (#14450)

Implemented GitHub style image diff

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 27 Feb 2021 00:19:24 +0000 (00:19 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoDisable broken OAuth2 providers at startup (#14802)
zeripath [Fri, 26 Feb 2021 03:20:58 +0000 (03:20 +0000)]
Disable broken OAuth2 providers at startup (#14802)

Instead of causing a log.Fatal, we should handle broken OAuth2
providers by disabling them.

Fix #8930

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 26 Feb 2021 00:19:27 +0000 (00:19 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoFix dashboard UI bugs and more (#14767)
Mike L [Thu, 25 Feb 2021 12:35:43 +0000 (13:35 +0100)]
Fix dashboard UI bugs and more (#14767)

This PR fixes a few UI bugs I spontaneously encountered:

- Fixes emojis in repo titles getting head-cut and tail-cut in dashboard feed due to introduction of 1.25 em emojis at 1 em line-height, by simply using the original 1 3/7 em value of `semantic.css`
- Fixes regression (too long repo names should be capped to 70%) in #13828 due to flex children not respecting properties like `overflow: hidden;`, and removes a block of dead style code
- Follow-up to #14761, removes extraneous code for top navbar and correct right margin for Font Awesome
- Fixes color emphasis inversion in arc-green theme for top right buttons (edit, delete) on commit view boxes

3 years agouse gogs.ico to create a better svg for migration page (#14795)
6543 [Thu, 25 Feb 2021 06:13:44 +0000 (07:13 +0100)]
use gogs.ico to create a better svg for migration page (#14795)