]> source.dussan.org Git - gitea.git/log
gitea.git
3 years agoSend notifications for mentions in pulls, issues, (code-)comments (#14218) (#14221)
Jimmy Praet [Sun, 3 Jan 2021 13:44:40 +0000 (14:44 +0100)]
Send notifications for mentions in pulls, issues, (code-)comments (#14218) (#14221)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoFix avatar bugs (#14217) (#14220)
6543 [Sun, 3 Jan 2021 01:21:39 +0000 (01:21 +0000)]
Fix avatar bugs (#14217) (#14220)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoEnsure that schema search path is set with every connection on postgres (#14131)...
zeripath [Sat, 2 Jan 2021 17:58:53 +0000 (17:58 +0000)]
Ensure that schema search path is set with every connection on postgres (#14131) (#14216)

Backport #14131

Unfortunately every connection to postgres requires that the search path is
set appropriately.

This PR shadows the postgres driver to ensure that as soon as a connection
is open, the search_path is set appropriately.

Fix #14088

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix dashboard issues labels filter bug (#14210) (#14214)
Lunny Xiao [Sat, 2 Jan 2021 17:08:04 +0000 (01:08 +0800)]
Fix dashboard issues labels filter bug (#14210) (#14214)

3 years agoWhen visit /favicon.ico but the static file is not exist return 404 but not continue...
Lunny Xiao [Sat, 2 Jan 2021 10:52:36 +0000 (18:52 +0800)]
When visit /favicon.ico but the static file is not exist return 404 but not continue to handle the route (#14211) (#14213)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agofix branch selector on new issue page (#14194) (#14207)
a1012112796 [Fri, 1 Jan 2021 14:14:49 +0000 (22:14 +0800)]
fix branch selector on new issue page (#14194) (#14207)

fix #14185

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoCheck for notExist on profile repository page (#14197) (#14203)
zeripath [Thu, 31 Dec 2020 13:03:56 +0000 (13:03 +0000)]
Check for notExist on profile repository page (#14197) (#14203)

Backport #14197

Fix #14189

3 years agoAdd changelog for v1.13.1 (#14172) v1.13.1
Lunny Xiao [Mon, 28 Dec 2020 17:36:22 +0000 (01:36 +0800)]
Add changelog for v1.13.1 (#14172)

* Add changelog for v1.13.1

* Update CHANGELOG.md

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Update CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Update CHANGELOG.md

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Update CHANGELOG.md

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoFix bug of link query order on markdown render (#14156) (#14171)
Lunny Xiao [Mon, 28 Dec 2020 17:08:55 +0000 (01:08 +0800)]
Fix bug of link query order on markdown render (#14156) (#14171)

* Fix bug of link query order on markdown render

* Fix bluemonday bug and fix one wrong test

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoMigration: drop too long repo topics (#14152) (#14155)
6543 [Sun, 27 Dec 2020 02:57:06 +0000 (02:57 +0000)]
Migration: drop too long repo topics (#14152) (#14155)

* Migration: drop to long repo topics

* Update modules/migrations/gitea_uploader.go

3 years agoFix escaping issue in diff (#14154)
zeripath [Sat, 26 Dec 2020 22:15:42 +0000 (22:15 +0000)]
Fix escaping issue in diff (#14154)

Ensure that linecontent is escaped before passing to template.HTML

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix creation OAuth2 auth source from CLI. (#14146)
Daniil Pankratov [Fri, 25 Dec 2020 12:02:52 +0000 (15:02 +0300)]
Fix creation OAuth2 auth source from CLI. (#14146)

Fix #8356

3 years agoEnsure that search term and page are not lost on adoption page-turn (#14133) (#14143)
zeripath [Thu, 24 Dec 2020 21:54:15 +0000 (21:54 +0000)]
Ensure that search term and page are not lost on adoption page-turn (#14133) (#14143)

Backport #14133

Fix #14111

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agomore test case for STORAGE_TYPE overrides (and fixes) (#14096) (#14104)
6543 [Tue, 22 Dec 2020 07:13:57 +0000 (07:13 +0000)]
more test case for STORAGE_TYPE overrides (and fixes) (#14096) (#14104)

Signed-off-by: 胡玮文 <huww98@outlook.com>
Co-authored-by: 胡玮文 <huww98@outlook.com>
3 years agoFix storage config implementation (#14091) (#14095)
6543 [Mon, 21 Dec 2020 22:56:18 +0000 (22:56 +0000)]
Fix storage config implementation (#14091) (#14095)

The design is very flexible, but not implemented correctly.
This commit fixes several issues:
* Costom storage type stated in https://docs.gitea.io/en-us/config-cheat-sheet/#storage-storage
  not working
* [storage.attachments], [storage.minio] section not respected

Signed-off-by: 胡玮文 <huww98@outlook.com>
Co-authored-by: 胡玮文 <huww98@outlook.com>
3 years agodep: update crypto. info: https://golangtutorial.dev/news/fix-in-crypto-package/...
techknowlogick [Mon, 21 Dec 2020 06:02:40 +0000 (01:02 -0500)]
dep: update crypto. info: https://golangtutorial.dev/news/fix-in-crypto-package/ (#14078)

3 years agoFix panic in BasicAuthDecode (#14046) (#14048)
silverwind [Fri, 18 Dec 2020 16:19:43 +0000 (17:19 +0100)]
Fix panic in BasicAuthDecode (#14046) (#14048)

* Fix panic in BasicAuthDecode

If the string does not contain ":" that function would run into an
`index out of range [1] with length 1` error. prevent that.

* Update BasicAuthDecode()

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
3 years ago[API] GetCombinedCommitStatusByRef always return json & swagger doc fixes (#14047)
6543 [Fri, 18 Dec 2020 13:38:47 +0000 (13:38 +0000)]
[API] GetCombinedCommitStatusByRef always return json & swagger doc fixes (#14047)

* Fix swagger docs

* always return json

3 years agoHotFix: Hide private partisipation in Orgs (#13994) (#14031)
6543 [Thu, 17 Dec 2020 21:32:24 +0000 (21:32 +0000)]
HotFix: Hide private partisipation in Orgs (#13994) (#14031)

* HotFix: Hide private partisipation in Orgs

Co-authored-by: zeripath <art27@cantab.net>
3 years agoAlways wait for the cmd to finish (#14006) (#14039)
zeripath [Thu, 17 Dec 2020 20:06:51 +0000 (20:06 +0000)]
Always wait for the cmd to finish (#14006) (#14039)

Backport #14006

After cancelling the context we still need to wait for the
command to finish otherwise zombie processes may occur

Fix #13987

3 years agoDon't use simpleMDE editor on mobile devices for 1.13 (#14029)
mrsdizzie [Thu, 17 Dec 2020 16:39:12 +0000 (11:39 -0500)]
Don't use simpleMDE editor on mobile devices for 1.13 (#14029)

* Don't use simpleMDE editor on mobile devices

simpleMDE doesn't work properly on mobile devices -- We've replaced it with the slightly more working easyMDE in 1.14 but since that change can't be backported to 1.13 we will just disable the editor on mobile here.

* make isMobile function per code review -- disable simpleMDE for code review and replies

* Fix issue with plain text and wiki

Co-authored-by: silverwind <me@silverwind.io>
3 years agoAdd emoji in label to project boards (#13978) (#14021)
6543 [Wed, 16 Dec 2020 20:15:58 +0000 (20:15 +0000)]
Add emoji in label to project boards (#13978) (#14021)

* Update view.tmpl

Added rendering of emoji to project label

* Add RenderEmojiPlain to the title and remove has-emoji

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Rakshith Ravi <rakshith.ravi@gmx.com>
Co-authored-by: zeripath <art27@cantab.net>
3 years agoSend webhook when tag is removed via Web UI (#14015) (#14019)
Cirno the Strongest [Wed, 16 Dec 2020 17:24:02 +0000 (18:24 +0100)]
Send webhook when tag is removed via Web UI (#14015) (#14019)

* Send webhook when tag is removed via Web UI

* Stray code (cherry picked from commit 53308de0bf6880798666a98cbc2df6c7be527f50)

* Fix for 1.13

3 years agoalways use headCommitID for review comment diff (#14011)
Jimmy Praet [Wed, 16 Dec 2020 10:50:30 +0000 (11:50 +0100)]
always use headCommitID for review comment diff (#14011)

3 years agoTrim the branch prefix from action.GetBranch (#13981) (#13986)
zeripath [Mon, 14 Dec 2020 20:35:40 +0000 (20:35 +0000)]
Trim the branch prefix from action.GetBranch (#13981) (#13986)

Backport #13981

 #13882 has revealed that the refname of an action is actually only a
refname pattern and necessarily a branch. For examplem pushing to
refs/heads/master will result in action with refname refs/heads/master
but pushing to master will result in a refname master.

The simplest solution to providing a fix here is to trim the prefix
therefore this PR proposes this.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: a1012112796 <1012112796@qq.com>
Co-authored-by: a1012112796 <1012112796@qq.com>
3 years agoEnsure template renderer is available before storage handler (#13982)
zeripath [Mon, 14 Dec 2020 12:45:33 +0000 (12:45 +0000)]
Ensure template renderer is available before storage handler (#13982)

`ctx.Error` requires that templates are available for this to
render the error page otherwise there will be a panic at this
time.

This was fixed in #13164 but was not completely backported.

Fix #13971

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoWhenever the password is updated ensure that the hash algorithm is too (#13966) ...
zeripath [Sun, 13 Dec 2020 00:01:44 +0000 (00:01 +0000)]
Whenever the password is updated ensure that the hash algorithm is too (#13966) (#13967)

Backport #13966

`user.HashPassword` may potentially - and in fact now likely does - change
the `passwd_hash_algo` therefore whenever the `passwd` is updated, this
also needs to be updated.

Fix #13832

Thanks @fblaese for the hint

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoEnforce setting HEAD in wiki to master (#13950) (#13961)
6543 [Sat, 12 Dec 2020 17:21:26 +0000 (17:21 +0000)]
Enforce setting HEAD in wiki to master (#13950) (#13961)

The default branch in wikis must be master - therefore forcibly set the HEAD
to master.

Fix #13846

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
3 years agoFix feishu webhook caused by API changed (#13937) (#13938)
Lunny Xiao [Fri, 11 Dec 2020 15:11:32 +0000 (23:11 +0800)]
Fix feishu webhook caused by API changed (#13937) (#13938)

fix #13858

3 years agolog error when login failed (#13903) (#13913)
Lunny Xiao [Wed, 9 Dec 2020 15:37:15 +0000 (23:37 +0800)]
log error when login failed (#13903) (#13913)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoFix Quote Reply button on review diff (#13830) (#13898)
Jimmy Praet [Tue, 8 Dec 2020 22:12:35 +0000 (23:12 +0100)]
Fix Quote Reply button on review diff (#13830) (#13898)

Backport of #13830

Co-authored-by: 6543 <6543@obermui.de>
3 years agoFix Pull Merge when tag with same name as base branch exist (#13882) (#13896)
a1012112796 [Tue, 8 Dec 2020 11:58:44 +0000 (19:58 +0800)]
Fix Pull Merge when tag with same name as base branch exist (#13882) (#13896)

fix dst refspec error in 'Push back to upstream' when base branch have
same name with a tag.

fix #13851
Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
3 years ago[API] return original URL of Repositories (#13885) (#13886)
6543 [Tue, 8 Dec 2020 04:59:19 +0000 (04:59 +0000)]
[API] return original URL of Repositories (#13885) (#13886)

3 years agoFix branch/tag notifications in mirror sync (#13855) (#13862)
manuelluis [Sun, 6 Dec 2020 04:30:28 +0000 (05:30 +0100)]
Fix branch/tag notifications in mirror sync (#13855) (#13862)

Co-authored-by: Gitea <gitea@fake.local>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoFix mermaid chart size (#13865)
silverwind [Sun, 6 Dec 2020 03:13:31 +0000 (04:13 +0100)]
Fix mermaid chart size (#13865)

3 years agoFix crash in short link processor (#13839) (#13841)
mrsdizzie [Fri, 4 Dec 2020 03:08:48 +0000 (22:08 -0500)]
Fix crash in short link processor (#13839) (#13841)

Fixes #13819

3 years agoUpdate font stack to bootstrap's latest (#13834) (#13837)
silverwind [Fri, 4 Dec 2020 01:21:34 +0000 (02:21 +0100)]
Update font stack to bootstrap's latest (#13834) (#13837)

Backport #13834

3 years agoMake sure email recipients can see issue (#13820) (#13827)
John Olheiser [Thu, 3 Dec 2020 21:37:33 +0000 (15:37 -0600)]
Make sure email recipients can see issue (#13820) (#13827)

* Initial pass

* Remove over-op

Signed-off-by: jolheiser <john.olheiser@gmail.com>
3 years agoReply button is not removed when deleting a code review comment (#13824)
Jimmy Praet [Thu, 3 Dec 2020 20:26:47 +0000 (21:26 +0100)]
Reply button is not removed when deleting a code review comment (#13824)

Backport #13774

3 years agoWhen reinitialising DBConfig reset the database use flags (#13796) (#13811)
zeripath [Thu, 3 Dec 2020 10:13:19 +0000 (10:13 +0000)]
When reinitialising DBConfig reset the database use flags (#13796) (#13811)

Backport #13796

One perennial issue is users running the install page,
changing the database dialect and then suffering with issues

This PR simply resets all of the database.Use flags on
initDBConfig. This should prevent this issue from occuring.

Fix #13788
Fix #5480

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoMigrations: Use Process Manager to create own Context (#13793)
6543 [Wed, 2 Dec 2020 21:11:11 +0000 (22:11 +0100)]
Migrations: Use Process Manager to create own Context (#13793)

3 years ago1.13.0 Changelog (#13782) v1.13.0
techknowlogick [Wed, 2 Dec 2020 04:54:26 +0000 (23:54 -0500)]
1.13.0 Changelog (#13782)

Co-authored-by: 6543 <6543@obermui.de>
3 years agoset git-core paths in snap (#13711) (#13781)
techknowlogick [Wed, 2 Dec 2020 00:36:11 +0000 (19:36 -0500)]
set git-core paths in snap (#13711) (#13781)

Signed-off-by: artivis <deray.jeremie@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Jeremie Deray <deray.jeremie@gmail.com>
3 years agoAdd Allow-/Block-List for Migrate & Mirrors (#13610) (#13776)
6543 [Wed, 2 Dec 2020 00:28:34 +0000 (01:28 +0100)]
Add Allow-/Block-List for Migrate & Mirrors (#13610) (#13776)

* add black list and white list support for migrating repositories

* specify log message

* use blocklist/allowlist

* allways use lowercase to match url

* Apply allow/block

* Settings: use existing "migrations" section

* convert domains lower case

* dont store unused value

* Block private addresses for migration by default

* use proposed-upstream func to detect private IP addr

* add own error for blocked migration, add tests, imprufe api

* fix test

* fix-if-localhost-is-ipv4

* rename error & error message

* rename setting options

* Apply suggestions from code review

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoSet RUN_MODE prod by default (#13765) (#13767)
silverwind [Tue, 1 Dec 2020 01:55:38 +0000 (02:55 +0100)]
Set RUN_MODE prod by default (#13765) (#13767)

* Set RUN_MODE prod by default (#13765)

I think it's a bad default to have "dev" as the default run mode which
enables debugging and now also disables HTTP caching. It's better to
just default to a value suitable for general deployments.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* flip default in checkRunMode

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoFix bogus http requests on diffs (#13760) (#13761)
silverwind [Mon, 30 Nov 2020 19:51:48 +0000 (20:51 +0100)]
Fix bogus http requests on diffs (#13760) (#13761)

The .blob-excerpt elements don't have these data attributes in some
cases resulting in bogus http request when expanding a diff and clicking
into the expanded area. This prevents those.

Should backport to 1.13.

Fixes: https://github.com/go-gitea/gitea/issues/13759
3 years agoui: show 'owner' tag for real owner (#13689) (#13743)
a1012112796 [Sun, 29 Nov 2020 12:50:58 +0000 (20:50 +0800)]
ui: show 'owner' tag for real owner (#13689) (#13743)

* ui: show 'owner' tag for real owner

Signed-off-by: a1012112796 <1012112796@qq.com>
* Update custom/conf/app.example.ini

* simplify logic

fix logic
fix a small bug about original author

* remove system manager tag

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoPush HEAD instead of master when initialising repositories (#13719) (#13740)
zeripath [Sat, 28 Nov 2020 21:59:32 +0000 (21:59 +0000)]
Push HEAD instead of master when initialising repositories (#13719) (#13740)

* Push HEAD instead of master when initialising repositories

It is possible on modern gits to change the initial branch to something other than
master. This breaks initialising repositories because we assume that the initial
branch is going to be master unless specifically changed.

This PR simply bypasses this issue by pushing the HEAD rather than the master branch.

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update modules/repository/init.go

Co-authored-by: mrsdizzie <info@mrsdizzie.com>
Co-authored-by: mrsdizzie <info@mrsdizzie.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: mrsdizzie <info@mrsdizzie.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoIncrement skip to avoid infini-loop (#13703) (#13727)
John Olheiser [Sat, 28 Nov 2020 04:55:53 +0000 (22:55 -0600)]
Increment skip to avoid infini-loop (#13703) (#13727)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoCSS table fixes (#13693)
silverwind [Tue, 24 Nov 2020 17:45:24 +0000 (18:45 +0100)]
CSS table fixes (#13693)

Backport https://github.com/go-gitea/gitea/pull/13692 to 1.13.

3 years agofinaly fix gitlab migration with subdir 2.0 (#13646) (#13678)
6543 [Mon, 23 Nov 2020 16:40:58 +0000 (17:40 +0100)]
finaly fix gitlab migration with subdir 2.0 (#13646) (#13678)

* final fix 2.0?

* ignore Approvals for pulls if not found

* CI.restart()

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoValidate email before inserting/updating (#13475) (#13666)
6543 [Sun, 22 Nov 2020 17:31:35 +0000 (18:31 +0100)]
Validate email before inserting/updating (#13475) (#13666)

* Add email validity check (#13475)

* Improve error feedback for duplicate deploy keys

Instead of a generic HTTP 500 error page, a flash message is rendered
with the deploy key page template so inform the user that a key with the
intended title already exists.

* API returns 422 error when key with name exists

* Add email validity checking

Add email validity checking for the following routes:
[Web interface]
1. User registration
2. User creation by admin
3. Adding an email through user settings
[API]
1. POST /admin/users
2. PATCH /admin/users/:username
3. POST /user/emails

* Add further tests

* Add signup email tests

* Add email validity check for linking existing account

* Address PR comments

* Remove unneeded DB session

* Move email check to updateUser

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* skip email validation on empty string (#13627)

- move validation into its own function
- use a session for UpdateUserSetting

* rm TODO for backport

Co-authored-by: Chris Shyi <chrisshyi13@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years ago* Handle incomplete diff files properly (#13668)
6543 [Sun, 22 Nov 2020 16:51:39 +0000 (17:51 +0100)]
* Handle incomplete diff files properly (#13668)

The code for parsing diff hunks has a bug whereby a very long line in a very long diff would not be completely read leading to an unexpected character.

  This PR ensures that the line is completely cleared

* Also allow git max line length <4096

* Add test case

Fix #13602

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Andrew Thornton <art27@cantab.net>
3 years agoFix issue/pull request list assignee filter (#13647) (#13651)
Karl Heinz Marbaise [Thu, 19 Nov 2020 22:58:35 +0000 (23:58 +0100)]
Fix issue/pull request list assignee filter (#13647) (#13651)

* Fixes #13641 - Filtering in Pull Request kept all the time.
 - The URL contains all the time the assignee in cases
   where once a type has been selected.

Signed-off-by: Karl Heinz Marbaise <kama@soebes.de>
* Followup Fixes #13641 - Filtering in Pull Request kept all the time.
 - The URL contains all the time the assignee in cases
   where once a type has been selected.
 - The same behaviour was observed issues viewed via milestones.

Signed-off-by: Karl Heinz Marbaise <kama@soebes.de>
3 years agofinaly fix gitlab migration with subdir (#13629) (#13633)
techknowlogick [Thu, 19 Nov 2020 16:20:12 +0000 (11:20 -0500)]
finaly fix gitlab migration with subdir (#13629) (#13633)

* finaly fix #13535

* add logging

Co-authored-by: 6543 <6543@obermui.de>
3 years agoAPI: Fix GetQueryBeforeSince (#13561)
6543 [Thu, 19 Nov 2020 02:21:21 +0000 (03:21 +0100)]
API: Fix GetQueryBeforeSince (#13561)

3 years agoFix a bug when check if owner is active (#13613)
Lunny Xiao [Wed, 18 Nov 2020 09:59:24 +0000 (17:59 +0800)]
Fix a bug when check if owner is active (#13613)

3 years agoMigration: Gitlab: Support Subdirectory (#13563) (#13591)
6543 [Tue, 17 Nov 2020 07:01:33 +0000 (08:01 +0100)]
Migration: Gitlab: Support Subdirectory (#13563) (#13591)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoFix Fomatic Build (#13596)
silverwind [Mon, 16 Nov 2020 23:01:05 +0000 (00:01 +0100)]
Fix Fomatic Build (#13596)

Port of #13593 to 1.13

3 years ago[API] Only Return Json (#13511) (#13565)
6543 [Sun, 15 Nov 2020 16:29:16 +0000 (17:29 +0100)]
[API] Only Return Json (#13511) (#13565)

Backport #13511

Co-authored-by: zeripath <art27@cantab.net>
3 years agomissing quotes in default value slice (#13550) (#13557)
techknowlogick [Sat, 14 Nov 2020 12:12:01 +0000 (07:12 -0500)]
missing quotes in default value slice (#13550) (#13557)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Patrick Aljord <patcito@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoAdd missed sync branch/tag webhook (#13538) (#13556)
Lunny Xiao [Sat, 14 Nov 2020 03:04:58 +0000 (11:04 +0800)]
Add missed sync branch/tag webhook (#13538) (#13556)

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoUse existing analyzer module for language detection for highlighting (#13522) (#13551)
mrsdizzie [Fri, 13 Nov 2020 23:05:51 +0000 (18:05 -0500)]
Use existing analyzer module for language detection for highlighting (#13522) (#13551)

* Use existing analyzer module for language detction for highlighting

Thanks @lafriks for pointing out we can reuse existing code for more reliable language detection here.

* Update modules/highlight/highlight.go

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: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoPrevent git operations for inactive users (#13527) (#13536)
Lunny Xiao [Fri, 13 Nov 2020 01:28:32 +0000 (09:28 +0800)]
Prevent git operations for inactive users (#13527) (#13536)

* prevent git operations for inactive users

* Some fixes

* Deny push to the repositories which's owner is inactive

* deny operations also when user is ProhibitLogin

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
3 years agoDisallow urlencoded new lines in git protocol paths if there is a port (#13521) ...
6543 [Wed, 11 Nov 2020 21:47:42 +0000 (22:47 +0100)]
Disallow urlencoded new lines in git protocol paths if there is a port (#13521) (#13524)

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
3 years agoMigration not fail on notmigrated reactions (#13507)
6543 [Wed, 11 Nov 2020 11:01:27 +0000 (12:01 +0100)]
Migration not fail on notmigrated reactions (#13507)

* Refactor: dedub code

* skip Reactions with Invalid ID

3 years ago1.13.0-rc2 changelog (#13503) v1.13.0-rc2
techknowlogick [Tue, 10 Nov 2020 21:09:05 +0000 (16:09 -0500)]
1.13.0-rc2 changelog (#13503)

3 years agoPrevent panic on git blame by limiting lines to 4096 bytes at most (#13491)
6543 [Tue, 10 Nov 2020 08:00:20 +0000 (09:00 +0100)]
Prevent panic on git blame by limiting lines to 4096 bytes at most (#13491)

Fix #12440
Closes #13192

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Andrew Thornton <art27@cantab.net>
3 years ago2nd attempt at re-request APIMergePullRequest (#13468) (#13490)
6543 [Tue, 10 Nov 2020 02:55:48 +0000 (03:55 +0100)]
2nd attempt at re-request APIMergePullRequest (#13468) (#13490)

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
3 years agoFix panic bug in handling multiple references in commit (#13486) (#13487)
6543 [Tue, 10 Nov 2020 02:16:34 +0000 (03:16 +0100)]
Fix panic bug in handling multiple references in commit (#13486) (#13487)

* Fix panic bug in handling multiple references in commit (#13486)

The issue lay in determining the position of matches on a second run round
a commit message in FindAllIssueReferences.

Fix #13483

Signed-off-by: Andrew Thornton <art27@cantab.net>
* CI.restart()

Co-authored-by: Andrew Thornton <art27@cantab.net>
3 years agouse registry mirror for docker-in-docker (#13438) (#13445)
techknowlogick [Fri, 6 Nov 2020 20:42:56 +0000 (15:42 -0500)]
use registry mirror for docker-in-docker (#13438) (#13445)

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoReplies to outdated code comments should also be outdated (#13217) (#13433)
6543 [Thu, 5 Nov 2020 20:14:55 +0000 (21:14 +0100)]
Replies to outdated code comments should also be outdated (#13217) (#13433)

* When replying to an outdated comment it should not appear on the files page

This happened because the comment took the latest commitID as its base instead of the
reviewID that it was replying to.

There was also no way of creating an already outdated comment - and a
reply to a review on an outdated line should be outdated.

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

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoAlternative fix for HTML diff entity split (#13425) (#13427)
mrsdizzie [Thu, 5 Nov 2020 16:54:03 +0000 (11:54 -0500)]
Alternative fix for HTML diff entity split (#13425) (#13427)

* Alternative fix for HTML diff entity split

This commit both reverts PR #13357 and uses the exiting implementation alredy used for spans to fix the same issue. That PR duplicates most of logic that is already present elsewhere and still was failing for some cases. This should be simpler as it uses the existing logic that already works for <span>s being split apart.

Added both test cases as well.

* Update gitdiff_test.go

* fmt

* entity can have uppercase letter, also add detailed comment per @zeripath

3 years agoAdd missing full names when DEFAULT_SHOW_FULL_NAME is enabled (#13424)
Wim [Wed, 4 Nov 2020 14:51:07 +0000 (15:51 +0100)]
Add missing full names when DEFAULT_SHOW_FULL_NAME is enabled (#13424)

3 years agoVendor: mvdan.cc/xurls v2.1.0 -> v2.2.0 (#13407)
6543 [Tue, 3 Nov 2020 01:56:51 +0000 (02:56 +0100)]
Vendor: mvdan.cc/xurls v2.1.0 -> v2.2.0 (#13407)

3 years agoFix 'add code comment' button being invisible all the time (#13389) (#13402)
Cirno the Strongest [Mon, 2 Nov 2020 23:09:29 +0000 (00:09 +0100)]
Fix 'add code comment' button being invisible all the time (#13389) (#13402)

* Fix 'add code comment' button being invisible all the time

* Fix off-center icon

* Remove old JS hover hack

* Show on full-line hover

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
(cherry picked from commit 7f7e7f3ca432fa80f9f5a8a71c9c10a89ac43c4f)

3 years agoFix reactions on code comments (#13390) (#13401)
Cirno the Strongest [Mon, 2 Nov 2020 14:05:41 +0000 (15:05 +0100)]
Fix reactions on code comments (#13390) (#13401)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
(cherry picked from commit 06268dcf53657ffe012abe878e1127ab4f954264)

3 years agoStorage configuration support `[storage]` (#13314) (#13379)
Lunny Xiao [Sun, 1 Nov 2020 15:12:50 +0000 (23:12 +0800)]
Storage configuration support `[storage]` (#13314) (#13379)

* Fix minio bug

* Add tests for storage configuration

* Change the Seek flag to keep compitable minio?

* Fix test when first-byte-pos of all ranges is greater than the resource length

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoFix typo (#13380) (#13382)
Lunny Xiao [Sun, 1 Nov 2020 07:14:39 +0000 (15:14 +0800)]
Fix typo (#13380) (#13382)

3 years agoWhen creating line diffs do not split within an html entity (#13357) (#13375)
zeripath [Sat, 31 Oct 2020 19:30:23 +0000 (19:30 +0000)]
When creating line diffs do not split within an html entity (#13357) (#13375)

Backport #13357

* When creating line diffs do not split within an html entity

Fix #13342

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

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

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoComment Header fixes (#13356) (#13374)
silverwind [Sat, 31 Oct 2020 17:25:10 +0000 (18:25 +0100)]
Comment Header fixes (#13356) (#13374)

Apply more flexboxes on comment header and remove float hacks. Needs
1.13 backport.

Fixes: https://github.com/go-gitea/gitea/issues/13316
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoFix scrolling to resolved comment anchors (#13343) (#13371)
zeripath [Sat, 31 Oct 2020 11:51:51 +0000 (11:51 +0000)]
Fix scrolling to resolved comment anchors (#13343) (#13371)

* Fix scrolling to resolved comment anchors

As described on discord, when the window.location.hash refers to a
resolved comment then the scroll to functionality does not work.

This PR fixes this.

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Apply suggestions from code review

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoFix links to repositories in /user/setting/repos (#13360) (#13362)
zeripath [Fri, 30 Oct 2020 17:51:52 +0000 (17:51 +0000)]
Fix links to repositories in /user/setting/repos (#13360) (#13362)

* Fix links to repositories in /user/setting/repos

somehow the links gained a spurious $ in the links.

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

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoMigrations should not fail for comment reactions (#13352) (#13355)
zeripath [Fri, 30 Oct 2020 00:05:15 +0000 (00:05 +0000)]
Migrations should not fail for comment reactions (#13352) (#13355)

An extension to #13444 - where we now ensure that comment reaction failures do not cause migrations failure

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoAnd there is another one ... (#13350)
zeripath [Thu, 29 Oct 2020 12:48:58 +0000 (12:48 +0000)]
And there is another one ... (#13350)

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoRemove obsolete change of email on profile page (#13341) (#13347)
techknowlogick [Thu, 29 Oct 2020 06:44:45 +0000 (02:44 -0400)]
Remove obsolete change of email on profile page (#13341) (#13347)

* Remove obsolete change of email on profile page

The change email on the account profile page is out-of-date
and unnecessary.

Changing email should be done using the account page.

Fix #13336

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoMigration failure during reaction migration from gitea (#13344) (#13345)
techknowlogick [Thu, 29 Oct 2020 03:57:15 +0000 (23:57 -0400)]
Migration failure during reaction migration from gitea (#13344) (#13345)

* Migrating reactions is just not that important

A failure during migrating reactions should not cause failure of
migration.

Signed-off-by: Andrew Thornton <art27@cantab.net>
* When checking issue reactions check the correct permission

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
3 years agoAdd deprecation notice for webhook payload's secret field (#13329)
JustAnotherArchivist [Thu, 29 Oct 2020 03:14:26 +0000 (03:14 +0000)]
Add deprecation notice for webhook payload's secret field (#13329)

3 years agoAdd migrated pulls to pull request task queue (#13331) (#13334)
zeripath [Tue, 27 Oct 2020 23:44:21 +0000 (23:44 +0000)]
Add migrated pulls to pull request task queue (#13331) (#13334)

* Add migrated pulls to pull request task queue

Fix #13321

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

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoDeny wrong pull (#13308) (#13326)
M4RKUS-11111 [Tue, 27 Oct 2020 20:26:07 +0000 (21:26 +0100)]
Deny wrong pull (#13308) (#13326)

* Deny wrong pull (#13308)

* Deny wrong pull

* Update routers/api/v1/repo/pull.go

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Markus <git+markus@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
* CI.restart()

Co-authored-by: Markus <git+markus@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoAvatar autogeneration fixed (#13282)
Paweł Bogusławski [Mon, 26 Oct 2020 13:56:14 +0000 (14:56 +0100)]
Avatar autogeneration fixed (#13282)

This mod fixes problem with initial avatar autogeneration and
avatar autogneration after deleting previous avatar.

Related: https://github.com/go-gitea/gitea/issues/13159
Fixes: 80a6b0f5bce15a641fc75f5f1ef6e42ef54424bc
Author-Change-Id: IB#1105243

3 years agoEnsure topics added using the API are added to the repository (#13285) (#13302)
zeripath [Mon, 26 Oct 2020 12:14:40 +0000 (12:14 +0000)]
Ensure topics added using the API are added to the repository (#13285) (#13302)

Partial Backport #13285

Fix #12426

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoAttempt to handle unready PR in tests (#13305) (#13310)
zeripath [Mon, 26 Oct 2020 11:13:39 +0000 (11:13 +0000)]
Attempt to handle unready PR in tests (#13305) (#13310)

Backport #13305

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years ago Fix Storage mapping (#13297) (#13307)
zeripath [Mon, 26 Oct 2020 01:40:46 +0000 (01:40 +0000)]
 Fix Storage mapping (#13297) (#13307)

* Fix Storage mapping (#13297)

Backport #13297

This PR fixes several bugs in setting storage

* The default STORAGE_TYPE should be the provided type.
* The Storage config should be passed in to NewStorage as a pointer - otherwise the Mappable interface function MapTo will not be found
* There was a bug in the MapTo function.

Fix #13286

Signed-off-by: Andrew Thornton <art27@cantab.net>
* add missing changes from backport #13164

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoWhen the git ref is unable to be found return broken pr (#13218) (#13303)
zeripath [Sun, 25 Oct 2020 23:10:09 +0000 (23:10 +0000)]
When the git ref is unable to be found return broken pr (#13218) (#13303)

Backport #13218

Fix #13216

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoFix bug isEnd detection on getIssues/getPullRequests (#13299) (#13301)
Lunny Xiao [Sun, 25 Oct 2020 08:13:26 +0000 (16:13 +0800)]
Fix bug isEnd detection on getIssues/getPullRequests (#13299) (#13301)

3 years agoStore task errors following migrations and display them (#13246) (#13287)
techknowlogick [Sat, 24 Oct 2020 05:02:36 +0000 (01:02 -0400)]
Store task errors following migrations and display them (#13246) (#13287)

* Store task errors following migrations and display them

When migrate tasks fail store the error in the task table
and ensure that they show on the status page.

Fix #13242

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update web_src/js/index.js

* Hide the failed first

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
3 years agoRemove PAM from auth dropdown when unavailable (#13276) (#13281)
John Olheiser [Fri, 23 Oct 2020 16:00:20 +0000 (11:00 -0500)]
Remove PAM from auth dropdown when unavailable (#13276) (#13281)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
3 years agoMigrations: Gitea should not fail just because of no apiConfig return (#13229) (...
6543 [Fri, 23 Oct 2020 11:11:40 +0000 (13:11 +0200)]
Migrations: Gitea should not fail just because of no apiConfig return (#13229) (#13273)

* close #13227

* log it

:+1:

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoMore arc-green fixes (#13247) (#13253)
silverwind [Thu, 22 Oct 2020 22:55:44 +0000 (00:55 +0200)]
More arc-green fixes (#13247) (#13253)

- Fix various white borders
- Tweak basic button style to have more contrast
- Add more contrast to hover styles
- Invert Matrix webhook icon

May backport to 1.13.

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