]>
source.dussan.org Git - gitea.git/log
silverwind [Fri, 4 Dec 2020 01:21:34 +0000 (02:21 +0100)]
Update font stack to bootstrap's latest (#13834) (#13837)
Backport #13834
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>
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
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>
6543 [Wed, 2 Dec 2020 21:11:11 +0000 (22:11 +0100)]
Migrations: Use Process Manager to create own Context (#13793)
techknowlogick [Wed, 2 Dec 2020 04:54:26 +0000 (23:54 -0500)]
1.13.0 Changelog (#13782)
Co-authored-by: 6543 <6543@obermui.de>
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>
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>
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>
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
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>
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>
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>
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.
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>
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>
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>
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>
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>
6543 [Thu, 19 Nov 2020 02:21:21 +0000 (03:21 +0100)]
API: Fix GetQueryBeforeSince (#13561)
Lunny Xiao [Wed, 18 Nov 2020 09:59:24 +0000 (17:59 +0800)]
Fix a bug when check if owner is active (#13613)
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>
silverwind [Mon, 16 Nov 2020 23:01:05 +0000 (00:01 +0100)]
Fix Fomatic Build (#13596)
Port of #13593 to 1.13
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>
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>
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>
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>
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>
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>
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
techknowlogick [Tue, 10 Nov 2020 21:09:05 +0000 (16:09 -0500)]
1.13.0-rc2 changelog (#13503)
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>
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>
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>
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>
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>
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
Wim [Wed, 4 Nov 2020 14:51:07 +0000 (15:51 +0100)]
Add missing full names when DEFAULT_SHOW_FULL_NAME is enabled (#13424)
6543 [Tue, 3 Nov 2020 01:56:51 +0000 (02:56 +0100)]
Vendor: mvdan.cc/xurls v2.1.0 -> v2.2.0 (#13407)
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 )
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 )
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>
Lunny Xiao [Sun, 1 Nov 2020 07:14:39 +0000 (15:14 +0800)]
Fix typo (#13380) (#13382)
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>
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>
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>
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>
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>
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>
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>
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>
JustAnotherArchivist [Thu, 29 Oct 2020 03:14:26 +0000 (03:14 +0000)]
Add deprecation notice for webhook payload's secret field (#13329)
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>
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>
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
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>
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>
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>
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>
Lunny Xiao [Sun, 25 Oct 2020 08:13:26 +0000 (16:13 +0800)]
Fix bug isEnd detection on getIssues/getPullRequests (#13299) (#13301)
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>
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>
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>
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>
zeripath [Thu, 22 Oct 2020 12:59:01 +0000 (13:59 +0100)]
Fix initial commit page & binary munching problem (#13249) (#13258)
Backport #13249
* Fix initial commit page
Unfortunately as a result of properly fixing ParsePatch the hack that
used git show <initial_commit_id> to get the diff for this failed.
This PR fixes this using the "super-secret" empty tree ref to make the
diff against.
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Also fix #13248
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update services/gitdiff/gitdiff.go
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: 6543 <6543@obermui.de>
mrsdizzie [Thu, 22 Oct 2020 02:37:50 +0000 (22:37 -0400)]
Add better error checking for inline html diff code (#13251)
* Fix error in diff html rendering (#13191)
* Fix error in diff html rendering
Was missing an optional whitespace check in regex. Also noticed a rare case where diff.Type == Equal would be empty and thus get a newline attached. Fixed that too.
Fixes #13177
* Update services/gitdiff/gitdiff.go
Co-authored-by: zeripath <art27@cantab.net>
* Update gitdiff_test.go
* fmt
Co-authored-by: zeripath <art27@cantab.net>
* Add better error checking for inline html diff code (#13239)
* Add better error checking for inline html diff code
A better fix for #13191 which cleans up this code a bit and adds basic checking which should avoid writing broken HTML in future situations.
* Update gitdiff_test.go
* better regex
Co-authored-by: zeripath <art27@cantab.net>
zeripath [Wed, 21 Oct 2020 18:54:19 +0000 (19:54 +0100)]
Return the full rejection message and errors in flash errors (#13221) (#13237)
* Return the full rejection message and errors in flash errors (#13221)
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update routers/repo/pull.go
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
6543 [Tue, 20 Oct 2020 22:39:37 +0000 (00:39 +0200)]
Update heatmap fixtures to restore tests (#13224) (#13225)
`the hotfix day`
techknowlogick [Tue, 20 Oct 2020 06:10:05 +0000 (02:10 -0400)]
Various arc-green fixes (#13214) (#13215)
- Style search dropdown
- Fix radio buttons and tweak checkboxes
- Add styling for error form elements
- Make borders brighter and focus more apparent
- Adjust comment box border color to match
Fixes: https://github.com/go-gitea/gitea/pull/12491
Co-authored-by: silverwind <me@silverwind.io>
techknowlogick [Mon, 19 Oct 2020 06:56:17 +0000 (02:56 -0400)]
Fix size and clickable area on file table back link (#13205) (#13207)
Fixes: https://github.com/go-gitea/gitea/issues/13038
Should backport to 1.13.
Co-authored-by: silverwind <me@silverwind.io>
a1012112796 [Sun, 18 Oct 2020 17:13:57 +0000 (01:13 +0800)]
Update CHANGELOG.md (#13200) (#13202)
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
techknowlogick [Sun, 18 Oct 2020 14:52:03 +0000 (10:52 -0400)]
When handling errors in storageHandler check underlying error (#13178) (#13193)
Unfortunately there was a mistake in #13164 which fails to handle
os.PathError wrapping an os.ErrNotExist
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
赵智超 [Sat, 17 Oct 2020 15:38:34 +0000 (23:38 +0800)]
fix a small nit (#13187)
Signed-off-by: a1012112796 <1012112796@qq.com>
zeripath [Sat, 17 Oct 2020 01:39:35 +0000 (02:39 +0100)]
Fix diff skipping lines (#13155)
* Fix diff skipping lines
Backport #13154
ParsePatch previously just skipped all lines that start with "+++ " or "--- "
and makes no attempt to see these lines in context.
This PR rewrites ParsePatch to pay attention to context and position
within a patch, ensuring that --- and +++ are only skipped if
appropriate.
This PR also fixes several issues with incomplete files.
Fix https://codeberg.org/Codeberg/Community/issues/308
Fix #13153
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add testcase
Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix comment
* simplify error handling
Signed-off-by: Andrew Thornton <art27@cantab.net>
* never return io.EOF
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
6543 [Fri, 16 Oct 2020 16:23:52 +0000 (18:23 +0200)]
Update go-version v1.2.3 -> v1.2.4 (#13169) (#13172)
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
6543 [Fri, 16 Oct 2020 01:46:56 +0000 (03:46 +0200)]
Show outdated comments in pull request (#13148) (#13162)
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Iván Valdés <iv@a.ki>
Co-authored-by: zeripath <art27@cantab.net>
Lauris BH [Thu, 15 Oct 2020 11:57:17 +0000 (14:57 +0300)]
Fix Italian language file parsing error (#13156)
Matti R [Wed, 14 Oct 2020 20:57:12 +0000 (16:57 -0400)]
align mysql service settings in drone
Lauris BH [Wed, 14 Oct 2020 20:54:56 +0000 (23:54 +0300)]
Add back only missing translation for Latvian language (#13144)
* Add back only missing translation for Latvian language
* Backport German translations
Matti R [Wed, 14 Oct 2020 20:45:38 +0000 (16:45 -0400)]
run mysql container with same conditions as other services
6543 [Wed, 14 Oct 2020 18:48:03 +0000 (20:48 +0200)]
Changelog v1.13.0-RC1 (#13142)
* Changelog v1.13.0
* reorder topics
* impruve
* Apply suggestions from code review
* Apply suggestions from code review
* Apply suggestions from code review
* Apply suggestions from code review
* Goldmark ...
* Add 12516
* Apply suggestions from code review
* Update CHANGELOG.md
* Apply suggestions from code review
Co-authored-by: techknowlogick <matti@mdranta.net>
* Apply suggestions from code review
Co-authored-by: zeripath <art27@cantab.net>
* Update CHANGELOG.md
* Apply suggestions from code review
Co-authored-by: 6543 <6543@obermui.de>
* Securety is more importand than Breaking ...
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: zeripath <art27@cantab.net>
GiteaBot [Wed, 14 Oct 2020 17:02:15 +0000 (17:02 +0000)]
[skip ci] Updated translations via Crowdin
Anders Eurenius Runvald [Wed, 14 Oct 2020 17:01:11 +0000 (19:01 +0200)]
Update sshd_config (#13143)
Afaik, adding these lines does nothing unless the file(s) are present. Having them in let's admins supply certs instead of relying on TOFU.
Co-authored-by: zeripath <art27@cantab.net>
GiteaBot [Wed, 14 Oct 2020 13:09:05 +0000 (13:09 +0000)]
[skip ci] Updated translations via Crowdin
Lunny Xiao [Wed, 14 Oct 2020 13:07:51 +0000 (21:07 +0800)]
Avatars and Repo avatars support storing in minio (#12516)
* Avatar support minio
* Support repo avatar minio storage
* Add missing migration
* Fix bug
* Fix test
* Add test for minio store type on avatars and repo avatars; Add documents
* Fix bug
* Fix bug
* Add back missed avatar link method
* refactor codes
* Simplify the codes
* Code improvements
* Fix lint
* Fix test mysql
* Fix test mysql
* Fix test mysql
* Fix settings
* Fix test
* fix test
* Fix bug
GiteaBot [Wed, 14 Oct 2020 12:12:40 +0000 (12:12 +0000)]
[skip ci] Updated translations via Crowdin
赵智超 [Wed, 14 Oct 2020 12:11:11 +0000 (20:11 +0800)]
Show original author's reviews on pull summary box (#13127)
follow #12039, show original author's reviews by other way.
fix #11705.
Signed-off-by: a1012112796 <1012112796@qq.com>
GiteaBot [Wed, 14 Oct 2020 11:18:41 +0000 (11:18 +0000)]
[skip ci] Updated translations via Crowdin
Lauris BH [Wed, 14 Oct 2020 11:17:40 +0000 (14:17 +0300)]
Fix punctuation in trust model description (#13140)
zeripath [Wed, 14 Oct 2020 04:49:33 +0000 (05:49 +0100)]
Finally fix diff names (#13136)
* Finally fix diff names
#12771 attempted to fix diff by avoiding the git diff line as
it is possible to have an ambiguous line here.
#12254 attempted to fix diff by assuming that names would quoted
if they needed to be and if one was quoted then both would be.
Both of these were wrong.
I have now discovered `--src-prefix` and `--dst-prefix` which
means that we can set this in such a way to force the git diff
to always be unambiguous.
Therefore this PR rollsback most of the changes in #12771 and
uses these options to fix this.
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update services/gitdiff/gitdiff.go
* Update services/gitdiff/gitdiff.go
* Update modules/repofiles/temp_repo.go
* fix test
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
GiteaBot [Wed, 14 Oct 2020 04:07:05 +0000 (04:07 +0000)]
[skip ci] Updated translations via Crowdin
6543 [Wed, 14 Oct 2020 04:06:00 +0000 (06:06 +0200)]
Gitea 2 Gitea migration (#12657)
* first draft
* update gitea sdk to
9e280adb4da
* adapt feat of updated sdk
* releases now works
* break the Reactions loop
* use convertGiteaLabel
* fix endless loop because paggination is not supported there !!!
* rename gitea local uploader files
* pagination can bite you in the ass
* Version Checks
* lint
* docs
* rename gitea sdk import to miss future conficts
* go-swagger: dont scan the sdk structs
* make sure gitea can shutdown gracefully
* make GetPullRequests and GetIssues similar
* rm useles
* Add Test: started ...
* ... add tests ...
* Add tests and Fixing things
* Workaround missing SHA
* Adapt: Ensure that all migration requests are cancellable
(
714ab71ddc4260937b1480519d453d2dc4e77dd6 )
* LINT: fix misspells in test set
* adapt ListMergeRequestAwardEmoji
* update sdk
* Return error when creating giteadownloader failed
* update sdk
* adapt new sdk
* adopt new features
* check version before err
* adapt: 'migrate service type switch page'
* optimize
* Fix DefaultBranch
* impruve
* handle subPath
* fix test
* Fix ReviewCommentPosition
* test GetReviews
* add DefaultBranch int test set
* rm unused
* Update SDK to v0.13.0
* addopt sdk changes
* found better link
* format template
* Update Docs
* Update Gitea SDK (v0.13.1)
赵智超 [Tue, 13 Oct 2020 18:50:57 +0000 (02:50 +0800)]
[Enhancement] Allow admin to merge pr with protected file changes (#12078)
* [Enhancement] Allow admin to merge pr with protected file changes
As tilte, show protected message in diff page and merge box.
Signed-off-by: a1012112796 <1012112796@qq.com>
* remove unused ver
* Update options/locale/locale_en-US.ini
Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
* Add TrN
* Apply suggestions from code review
* fix lint
* Update options/locale/locale_en-US.ini
Co-authored-by: zeripath <art27@cantab.net>
* Apply suggestions from code review
* move pr proteced files check to TestPatch
* Call TestPatch when protected branches settings changed
* Apply review suggestion @CirnoT
* move to service @lunny
* slightly restructure routers/private/hook.go
Adds a lot of comments and simplifies the logic
Signed-off-by: Andrew Thornton <art27@cantab.net>
* placate lint
Signed-off-by: Andrew Thornton <art27@cantab.net>
* skip duplicate protected files check
* fix check logic
* slight refactor of TestPatch
Signed-off-by: Andrew Thornton <art27@cantab.net>
* When checking for protected files changes in TestPatch use the temporary repository
Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix introduced issue with hook
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove the check on PR index being greater than 0 as it unnecessary
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
GiteaBot [Tue, 13 Oct 2020 16:25:13 +0000 (16:25 +0000)]
[skip ci] Updated translations via Crowdin
zeripath [Tue, 13 Oct 2020 16:24:06 +0000 (17:24 +0100)]
Move update-server-info to hooks (#12826)
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
6543 [Tue, 13 Oct 2020 05:39:17 +0000 (07:39 +0200)]
Add API Section to Changelog (#13125)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
zeripath [Tue, 13 Oct 2020 03:58:34 +0000 (04:58 +0100)]
Provide self-registering storage system (#12978)
* Provide self-registering storage system
Signed-off-by: Andrew Thornton <art27@cantab.net>
* More simplification
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove old strings from setting
Signed-off-by: Andrew Thornton <art27@cantab.net>
* oops attachments not attachment
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
6543 [Tue, 13 Oct 2020 00:41:49 +0000 (02:41 +0200)]
[API] If User is Admin, show 500 error message on PROD mode too (#13115)
* API: show admin 500 error message on PROD mode too
* a nit
* dont miss InternalServerError
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
6543 [Tue, 13 Oct 2020 00:01:57 +0000 (02:01 +0200)]
Save TimeStamps for Star, Label, Follow, Watch and Collaboration to Database (#13124)
* Add timestamps to Star, Label, LanguageStat, Follow, Watch and Collaboration
* Star do not need updated
* LanguageStat do not need update (they wont change)
* fix unit-test
zeripath [Mon, 12 Oct 2020 21:09:21 +0000 (22:09 +0100)]
Return 404 not 500 from API if team does not exist (#13118)
If team does not exist expect ErrTeamNotExist not ErrUserNotEXist
Fix #11336
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>