]> source.dussan.org Git - gitea.git/log
gitea.git
4 years agoChangelog for 1.11.8 (#12004) release/v1.11 v1.11.8
Lauris BH [Sun, 21 Jun 2020 21:00:50 +0000 (00:00 +0300)]
Changelog for 1.11.8 (#12004)

4 years agoReally fix __webpack_public_path__ for 1.11 (#11961)
silverwind [Thu, 18 Jun 2020 20:40:07 +0000 (22:40 +0200)]
Really fix __webpack_public_path__ for 1.11 (#11961)

Trailing slash is actually significant, fixed that and i've now tested
it as well.

Ref: https://github.com/go-gitea/gitea/issues/11839#issuecomment-646203505

4 years agoChangelog v1.11.7 (#11953) v1.11.7
6543 [Thu, 18 Jun 2020 15:37:47 +0000 (17:37 +0200)]
Changelog v1.11.7 (#11953)

* Changelog v1.11.7

* Update CHANGELOG.md

4 years agoUse ID or Where to instead directly use Get when load object from database (#11925...
6543 [Wed, 17 Jun 2020 19:54:26 +0000 (21:54 +0200)]
Use ID or Where to instead directly use Get when load object from database (#11925) (#11935)

Backport #11925

Use ID or Where to instead directly use Get when load object from database

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years agoFix __webpack_public_path__ for 1.11 (#11907)
silverwind [Tue, 16 Jun 2020 15:26:45 +0000 (17:26 +0200)]
Fix __webpack_public_path__ for 1.11 (#11907)

Fixes: https://github.com/go-gitea/gitea/issues/11839
4 years agoFix verification of subkeys of default gpg key (#11713) (#11902)
zeripath [Mon, 15 Jun 2020 20:04:37 +0000 (21:04 +0100)]
Fix verification of subkeys of default gpg key (#11713) (#11902)

Backport #11713

* Fix verification of subkeys of default gpg key

Fix #10309

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove debug log

* Update models/gpg_key.go

* As per @6543

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago[Workaround] doctor xorm.Count nil on sqlite error (#11741)
6543 [Tue, 9 Jun 2020 05:37:07 +0000 (07:37 +0200)]
[Workaround] doctor xorm.Count nil on sqlite error (#11741)

* make it similar to v1.12&master

* workaround from xorm bug

* CI.restart()

4 years agoRemove unnecessary parentheses in wiki/view template (#11781)
pvgoran [Sat, 6 Jun 2020 06:20:32 +0000 (13:20 +0700)]
Remove unnecessary parentheses in wiki/view template (#11781)

It's a backport of #10583 to version 1.11.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoAdd changelog for 1.11.6 (#11695) v1.11.6
guillep2k [Sat, 30 May 2020 20:21:19 +0000 (17:21 -0300)]
Add changelog for 1.11.6 (#11695)

* Add changelog for 1.11.6

* Update CHANGELOG.md

Co-authored-by: techknowlogick <matti@mdranta.net>
* Update CHANGELOG.md

Co-authored-by: techknowlogick <matti@mdranta.net>
* Apply suggestions from @lafriks

* #11459 is bugfix

Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
Co-authored-by: techknowlogick <matti@mdranta.net>
4 years agoAdd missing check for #11111 backport (#11693)
guillep2k [Sat, 30 May 2020 15:54:57 +0000 (12:54 -0300)]
Add missing check for #11111 backport (#11693)

Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
4 years agoFix missing authorization check on pull for public repos of private/limited org ...
Cirno the Strongest [Fri, 29 May 2020 21:12:21 +0000 (23:12 +0200)]
Fix missing authorization check on pull for public repos of private/limited org (#11656) (#11683)

Fixes #11651

(cherry picked from commit 02fa329a7c2190d947cd5e02ea90d2d4406653be)

4 years agoAdd tracked time fix to doctor (part of #11111) (#11138)
6543 [Fri, 29 May 2020 15:41:23 +0000 (17:41 +0200)]
Add tracked time fix to doctor (part of #11111) (#11138)

Backports the tracked-time fix from #11111 (part of #11111)

Fixes tracked time errors following repo deletion (#10280) and adds the fix to the default doctor tasks

4 years agoFix webpack chunk loading with STATIC_URL_PREFIX (#11526) (#11544)
silverwind [Thu, 28 May 2020 23:49:38 +0000 (01:49 +0200)]
Fix webpack chunk loading with STATIC_URL_PREFIX (#11526) (#11544)

Previously, we had only set __webpack_public_path__ to a path which
caused webpack chunks to be loaded from the current origin which is
incorrect when STATIC_URL_PREFIX points to another origin.

This should fix the issue curretnly seen on gitea.com.

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoReturn json on 500 error from API (#11574) (#11660)
6543 [Thu, 28 May 2020 18:27:29 +0000 (20:27 +0200)]
Return json on 500 error from API (#11574) (#11660)

Backport #11574

add API specific InternalServerError()

InternalServerError

4 years agoPrevent (caught) panic on login (#11590) (#11598)
zeripath [Wed, 27 May 2020 20:37:27 +0000 (21:37 +0100)]
Prevent (caught) panic on login (#11590) (#11598)

Backport #11590

Unfortunately when the virtual session is released it requires that the
real session does not exist. This worked fine when sessions were only
saved at the end of request/response cycle however, now sessions are
saved proactively this does not hold.

The result is a caught panic in the logs during every log-in.  This
panic has no significant side-effects but should not occur.

This PR marks the virtual session as released when released and updates
it if the same session is released again.

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoFix wrong milestone in webhook message (#11596) (#11612)
Gary Kim [Sun, 24 May 2020 23:03:02 +0000 (07:03 +0800)]
Fix wrong milestone in webhook message (#11596) (#11612)

Backport of #11596

Signed-off-by: Gary Kim <gary@garykim.dev>
4 years agoFix commit page js error (1.11 backport) (#11527)
silverwind [Thu, 21 May 2020 02:01:01 +0000 (04:01 +0200)]
Fix commit page js error (1.11 backport) (#11527)

Partial backport of https://github.com/go-gitea/gitea/commit/fd094eea959a235654b7591da066dcbbee11fc25 to 1.11.

Fixes: https://github.com/go-gitea/gitea/issues/11518
4 years agoUse media links for img in post-process (#10515) (#11504)
zeripath [Tue, 19 May 2020 22:55:06 +0000 (23:55 +0100)]
Use media links for img in post-process (#10515) (#11504)

* use media links for img in post-process

* do not visit text of anchors

4 years agoRemove unnecessary parentheses in wiki/revision template (#11481)
pvgoran [Mon, 18 May 2020 22:05:27 +0000 (05:05 +0700)]
Remove unnecessary parentheses in wiki/revision template (#11481)

This fixes the error on "Page Revision" page, similar to #10552.

4 years agoEnsure public repositories in private organizations are visible and fix admin organiz...
6543 [Mon, 18 May 2020 01:18:14 +0000 (03:18 +0200)]
Ensure public repositories in private organizations are visible and fix admin organizations list (#11465) (#11475)

Partial Backport of #11465

Co-authored-by: zeripath <art27@cantab.net>
4 years agoAllow all members of private orgs to see public repos (#11442) (#11459)
zeripath [Sun, 17 May 2020 22:53:09 +0000 (23:53 +0100)]
Allow all members of private orgs to see public repos (#11442) (#11459)

* Allow all members of private orgs to see public repos (#11442)

Backport (#11442)

Allow all members of private orgs to see public repos

Fix #10144

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update models/repo_list.go

* Oops missed the repos we own!

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoSet correct content_type value for Gogs/Gitea webhooks (#9504) (#10456) (#11461)
zeripath [Sun, 17 May 2020 19:08:59 +0000 (20:08 +0100)]
Set correct content_type value for Gogs/Gitea webhooks (#9504) (#10456) (#11461)

The content_type value was defaulting to the string value of the
ContentType, not the integer value as expected by the backend.

Co-authored-by: Jeff Stein <jeff@jeffvstein.org>
4 years agoWhenever the ctx.Session is updated, release it to save it before sending the redirec...
zeripath [Sun, 17 May 2020 16:30:31 +0000 (17:30 +0100)]
Whenever the ctx.Session is updated, release it to save it before sending the redirect (#11456) (#11457)

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoForcibly clean and destroy the session on logout (#11447) (#11451)
zeripath [Sun, 17 May 2020 11:32:33 +0000 (12:32 +0100)]
Forcibly clean and destroy the session on logout (#11447) (#11451)

Backport #11447

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoUse session for retrieving org teams (#11438) (#11439)
guillep2k [Sat, 16 May 2020 21:10:04 +0000 (18:10 -0300)]
Use session for retrieving org  teams (#11438) (#11439)

Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
4 years agoFix /api/v1/orgs/* endpoints by changing parameter to :org from :orgname (#11381)
6543 [Tue, 12 May 2020 05:46:44 +0000 (07:46 +0200)]
Fix /api/v1/orgs/* endpoints by changing parameter to :org from :orgname (#11381)

4 years agoUpdate Changelog for 1.11.5 (#11347) v1.11.5
6543 [Sat, 9 May 2020 19:26:27 +0000 (21:26 +0200)]
Update Changelog for 1.11.5 (#11347)

* Update Changelog for 1.11.5

* bumb version in docs

* Update CHANGELOG.md

Co-authored-by: zeripath <art27@cantab.net>
4 years agoFix tracked time issues (#11349) (#11354)
guillep2k [Sat, 9 May 2020 17:08:41 +0000 (14:08 -0300)]
Fix tracked time issues (#11349) (#11354)

Backport #11349

* Fix tracked time issues (#11349)

* Fix nil exeption: #11313

* fix 500

* activate test ðŸ˜†

* move logic

* Add missing import

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
4 years agoAdd NotifySyncPushCommits to indexer notifier (#11309) (#11338)
zeripath [Fri, 8 May 2020 21:40:51 +0000 (22:40 +0100)]
Add NotifySyncPushCommits to indexer notifier (#11309) (#11338)

Thanks to @simon-on-gh for tracking down the issue.

Fix #11200

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years agoPrevent timer leaks in Workerpool and others (#11333) (#11340)
zeripath [Fri, 8 May 2020 16:18:39 +0000 (17:18 +0100)]
Prevent timer leaks in Workerpool and others (#11333) (#11340)

There is a potential memory leak in `Workerpool` due to the intricacies of
`time.Timer` stopping.

Whenever a `time.Timer` is `Stop`ped its channel must be cleared using a
`select` if the result of the `Stop()` is `false`.

Unfortunately in `Workerpool` these were checked the wrong way round.

However, there were a few other places that were not being checked.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years agoAllow X in addition to x in tasks (#10979) (#11335)
zeripath [Fri, 8 May 2020 12:55:16 +0000 (13:55 +0100)]
Allow X in addition to x in tasks (#10979) (#11335)

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoChangelog v1.11.5 (#11329)
6543 [Fri, 8 May 2020 09:58:05 +0000 (11:58 +0200)]
Changelog v1.11.5 (#11329)

* Changelog v1.11.5

* Apply suggestions from code review

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoPrevent multiple listings of organization when creating a repository (#11303) (#11325)
6543 [Thu, 7 May 2020 20:30:51 +0000 (22:30 +0200)]
Prevent multiple listings of organization when creating a repository (#11303) (#11325)

Backport #11303

Prevent multiple listings of organization when creating a repository (#11303)

prevent double entries in results of GetOrgsCanCreateRepoByUserID

I first try to only add GroupBy directly but xorm return broken user objects ...

... solution was to just query related UserIDs(OrgIDs) first and return OrgUsers based on this IDs

close #11258

Co-authored-by: zeripath <art27@cantab.net>
4 years agoWhen delete tracked time through the API return 404 not 500 (#11319) (#11326)
6543 [Thu, 7 May 2020 19:42:33 +0000 (21:42 +0200)]
When delete tracked time through the API return 404 not 500 (#11319) (#11326)

4 years agoManage port in submodule refurl (#11305) (#11323)
zeripath [Thu, 7 May 2020 15:41:40 +0000 (16:41 +0100)]
Manage port in submodule refurl (#11305) (#11323)

* Manage port in submodule refurl

Fix #11304

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

Signed-off-by: Andrew Thornton <art27@cantab.net>
* URLJoin is causes a cyclic dependency and possibly isn't what what we want anyway

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Protect against leading .. in scp syntax

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoapi.Context.NotFound(...) should tolerate nil (#11288) (#11306)
zeripath [Tue, 5 May 2020 22:48:24 +0000 (23:48 +0100)]
api.Context.NotFound(...) should tolerate nil (#11288) (#11306)

There is an unfortunate signature change with the api.Context
NotFound function; whereas the normal modules/context/Context
NotFound function requires an error or nil, the api.Context
variant will panic with an NPE if a nil is provided.

This PR will allow api.Context.NotFound to tolerate a being
passed a nil.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoShow pull request selection even when unrelated branches (#11239) (#11283)
guillep2k [Mon, 4 May 2020 11:38:26 +0000 (08:38 -0300)]
Show pull request selection even when unrelated branches (#11239) (#11283)

Fix #10525

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agorepo: milestone: make /milestone/:id endpoint accessible (#11264) (#11282)
Kyle Evans [Mon, 4 May 2020 01:12:36 +0000 (20:12 -0500)]
repo: milestone: make /milestone/:id endpoint accessible (#11264) (#11282)

Previously, this required authentication, but there's not actually
any privileged information on this page.  Move the endpoint out of
the group that requires sign-in.  It still requires the ability to
read issues and pull requests, so private repositories (for instance)
will not be exposed.

Fixes #10312
Fixes #11233

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoFix GetContents(): Dont't ignore Executables (#11192) (#11209)
6543 [Sat, 25 Apr 2020 04:54:38 +0000 (06:54 +0200)]
Fix GetContents(): Dont't ignore Executables (#11192) (#11209)

4 years agoFix submodule paths when AppSubUrl is not root (#11098) (#11176)
zeripath [Wed, 22 Apr 2020 12:37:52 +0000 (13:37 +0100)]
Fix submodule paths when AppSubUrl is not root (#11098) (#11176)

Backport #11098

Fix #11002

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoPrevent clones and pushes to disabled wiki (#11131) (#11134)
zeripath [Sun, 19 Apr 2020 15:40:40 +0000 (16:40 +0100)]
Prevent clones and pushes to disabled wiki (#11131) (#11134)

Backport #11131

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoRemove errant third closing curly-bracket from account.tmpl and send account ID in...
zeripath [Sun, 19 Apr 2020 12:35:34 +0000 (13:35 +0100)]
Remove errant third closing curly-bracket from account.tmpl and send account ID in account.tmpl (#11130)

* Remove errant third } from account.tmpl

Fix #11128

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update templates/user/settings/account.tmpl

4 years agoOn Repo Deletion: Delete related TrackedTimes too (#11110) (#11125)
6543 [Sun, 19 Apr 2020 02:39:48 +0000 (04:39 +0200)]
On Repo Deletion: Delete related TrackedTimes too (#11110) (#11125)

4 years agoRefresh codemirror on show pull comment tab (#11100) (#11122)
zeripath [Sat, 18 Apr 2020 16:55:13 +0000 (17:55 +0100)]
Refresh codemirror on show pull comment tab (#11100) (#11122)

Fix #10975

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoFix merge dialog on protected branch with missing required statuses (#11074) (#11084)
6543 [Thu, 16 Apr 2020 07:45:34 +0000 (09:45 +0200)]
Fix merge dialog on protected branch with missing required statuses (#11074) (#11084)

It is possible for misconfigured protected branches to have required status checks that are not in any of the current statuses: Pending, Success, Error, Failure, or Warning - presumably because the CI has not contacted us as yet.

Fix #10636 by adding case: missing StatusChecks when these are missing

4 years agofix 404 and 500 image size in small size screen (#11043) (#11049)
赵智超 [Sun, 12 Apr 2020 12:24:15 +0000 (20:24 +0800)]
fix 404 and 500 image size in small size screen (#11043) (#11049)

do it by define Semantic UI image class

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoLoad PR Issue Poster on API too (#11033) (#11039)
6543 [Sat, 11 Apr 2020 04:10:16 +0000 (06:10 +0200)]
Load PR Issue Poster on API too (#11033) (#11039)

* Load pr Issue Poster on API too (#11033)

* ajust for 1.11 codebase

4 years ago[Backport] Fix release counter on API repository info (#10968) (#10996)
6543 [Mon, 6 Apr 2020 22:13:12 +0000 (00:13 +0200)]
[Backport] Fix release counter on API repository info (#10968) (#10996)

* Fix release counter on API repository info (#10968)

* correct Pull Count to v1.11 Fixtures

4 years agoMulitple Gitea Doctor improvements (#10943) (#10990) (#10064) (#9095) (#10991)
zeripath [Mon, 6 Apr 2020 20:15:20 +0000 (21:15 +0100)]
Mulitple Gitea Doctor improvements (#10943) (#10990) (#10064) (#9095) (#10991)

* Mulitple Gitea Doctor improvements (#10943)

Backport #10943

* Add `gitea doctor --list` flag to list the checks that will be run, including those by default
* Add `gitea doctor --run` to run specific checks
* Add `gitea doctor --all` to run all checks
* Add db version checker
* Add non-default recalculate merge bases check/fixer to doctor
* Add hook checker (Fix #9878) and ensure hooks are executable (Fix #6319)
* Fix authorized_keys checker - slight change of functionality here because parsing the command is fragile and we should just check if the authorized_keys file is essentially the same as what gitea would produce. (This is still not perfect as order matters - we should probably just md5sum the two files.)
* Add SCRIPT_TYPE check (Fix #10977)
* Add `gitea doctor --fix` to attempt to fix what is possible to easily fix
* Add `gitea doctor --log-file` to set the log-file, be it a file, stdout or to switch off completely. (Fixes previously undetected bug with certain xorm logging configurations - see @6543 comment.)

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Switch to io.Writer instead of io.StringWriter

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoFix rebase conflict detection in git 2.26 (#10930)
6543 [Fri, 3 Apr 2020 17:09:15 +0000 (19:09 +0200)]
Fix rebase conflict detection in git 2.26 (#10930)

Git changed the technique used in rebase from
simple apply-patches to use merge. This breaks
our conflict detection code.

created by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoGenerate Diff and Patch direct from Pull head (#10936) (#10938)
zeripath [Fri, 3 Apr 2020 14:06:54 +0000 (15:06 +0100)]
Generate Diff and Patch direct from Pull head (#10936) (#10938)

Backport #10936

* Generate Diff and Patch direct from Pull head

Fix #10932
Also fix "Empty Diff/Patch File when pull is merged"

Closes #10934

* Add tests to ensure that diff does not change
* Ensure diffs and pulls pages work if head branch is deleted too

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoChangelog v1.11.4 (#10916) v1.11.4
6543 [Wed, 1 Apr 2020 15:09:33 +0000 (17:09 +0200)]
Changelog v1.11.4 (#10916)

* output of changelog

* Apply suggestions from code review

* Update CHANGELOG.md

Co-authored-by: zeripath <art27@cantab.net>
4 years agoOnly update merge_base if not already merged (#10909)
zeripath [Wed, 1 Apr 2020 12:33:44 +0000 (13:33 +0100)]
Only update merge_base if not already merged (#10909)

* Only update merge_base if not already merged

Fix #10766

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Prevent race in transfer pull request

* Update services/pull/pull.go

4 years agoFix milestones too many SQL variables bug (#10880) (#10904)
Lunny Xiao [Tue, 31 Mar 2020 13:40:37 +0000 (21:40 +0800)]
Fix milestones too many SQL variables bug (#10880) (#10904)

* Fix milestones too many SQL variables bug

* Fix test

* Don't display repositories with no milestone and fix tests

* Remove unused code and add some comments

4 years agoProtect against NPEs in notifications list (#10879) (#10883)
zeripath [Mon, 30 Mar 2020 07:23:02 +0000 (08:23 +0100)]
Protect against NPEs in notifications list (#10879) (#10883)

* Protect against NPEs in notifications list (#10879)

Unfortunately there appears to be potential race with notifications
being set before the associated issue has been committed.

This PR adds protection in to the notifications list to log any failures
and remove these notifications from the display.

References #10815 - and prevents the panic but does not completely fix
this.

Signed-off-by: Andrew Thornton <art27@cantab.net>
* add log import

* Update models/notification.go

Co-Authored-By: Lauris BH <lauris@nix.lv>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoConvert plumbing.ErrObjectNotFound to git.ErrNotExist in getCommit (#10862) (#10868)
zeripath [Sun, 29 Mar 2020 16:47:53 +0000 (17:47 +0100)]
Convert plumbing.ErrObjectNotFound to git.ErrNotExist in getCommit (#10862) (#10868)

Backport #10862

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
4 years agoConvert plumbing.ErrReferenceNotFound to git.ErrNotExist in GetRefCommitID (#10676...
zeripath [Mon, 23 Mar 2020 13:01:25 +0000 (13:01 +0000)]
Convert plumbing.ErrReferenceNotFound to git.ErrNotExist in GetRefCommitID (#10676) (#10797)

* Fix panic in API pulls when headbranch does not exist (#10676)

Backport #10676

* Fix panic in API pulls when headbranch does not exist
* refix other reference to plumbing.ErrReferenceNotFound

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

Co-Authored-By: Lauris BH <lauris@nix.lv>
4 years agoaccount for empty lines in receive-hook message (#10773) (#10784)
zeripath [Sat, 21 Mar 2020 02:49:02 +0000 (02:49 +0000)]
account for empty lines in receive-hook message (#10773) (#10784)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoFix bug on branch API (#10767) (#10775)
Lunny Xiao [Fri, 20 Mar 2020 21:31:01 +0000 (05:31 +0800)]
Fix bug on branch API (#10767) (#10775)

* Fix bug on branch API (#10767)

* Fix branch api canPush and canMerge

4 years agoFIx hiding of fields in authorization source page (#10734) (#10752)
Lauris BH [Thu, 19 Mar 2020 15:40:01 +0000 (17:40 +0200)]
FIx hiding of fields in authorization source page (#10734) (#10752)

4 years agoMigrate to go-git/go-git v5.0.0 (#10735) (#10753)
Lauris BH [Thu, 19 Mar 2020 02:36:31 +0000 (04:36 +0200)]
Migrate to go-git/go-git v5.0.0 (#10735) (#10753)

4 years agoPrevent default for linkAction (#10742) (#10743)
John Olheiser [Mon, 16 Mar 2020 23:41:02 +0000 (18:41 -0500)]
Prevent default for linkAction (#10742) (#10743)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoChangelog for v1.10.6 (#10699) (#10709)
Lunny Xiao [Wed, 11 Mar 2020 03:09:56 +0000 (11:09 +0800)]
Changelog for v1.10.6 (#10699) (#10709)

* Changelog for v1.10.6

* Add warnning

* Apply suggestions from code review

Co-Authored-By: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
4 years agoAdd changelog for v1.11.3 (#10700) v1.11.3
Lunny Xiao [Tue, 10 Mar 2020 17:11:15 +0000 (01:11 +0800)]
Add changelog for v1.11.3 (#10700)

* Add changelog for v1.11.3

* Apply suggestions from code review

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

Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
4 years agocross compile using go 1.13.x (#10684)
techknowlogick [Mon, 9 Mar 2020 19:11:02 +0000 (15:11 -0400)]
cross compile using go 1.13.x (#10684)

4 years agoPrevent panic in stopwatch (#10670) (#10673)
zeripath [Sun, 8 Mar 2020 19:14:27 +0000 (19:14 +0000)]
Prevent panic in stopwatch (#10670) (#10673)

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoadd changelog for v1.10.5 (#10628) (#10632)
Lunny Xiao [Sun, 8 Mar 2020 14:54:23 +0000 (22:54 +0800)]
add changelog for v1.10.5 (#10628) (#10632)

4 years agoFix bug on pull view when required status check no ci result (#10648) (#10651)
Lunny Xiao [Sat, 7 Mar 2020 09:32:08 +0000 (17:32 +0800)]
Fix bug on pull view when required status check no ci result (#10648) (#10651)

4 years agoChangelog for v1.11.2 (#10627) v1.11.2
zeripath [Fri, 6 Mar 2020 07:38:11 +0000 (07:38 +0000)]
Changelog for v1.11.2 (#10627)

* Changelog for v1.11.2

* Update CHANGELOG.md

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Update CHANGELOG.md

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Update CHANGELOG.md

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Update CHANGELOG.md

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Update CHANGELOG.md

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Update CHANGELOG.md

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Update CHANGELOG.md

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* as per @jolheiser

* as per @jolheiser x2

* Update CHANGELOG.md

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

Co-Authored-By: John Olheiser <john.olheiser@gmail.com>
* another security pr

* another security pr

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
4 years agoIssue writers perms can modify issues (#10623) (#10626)
John Olheiser [Fri, 6 Mar 2020 04:42:20 +0000 (22:42 -0600)]
Issue writers perms can modify issues (#10623) (#10626)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoHandle deleted base branch in PR (#10618) (#10619)
Lauris BH [Thu, 5 Mar 2020 20:23:34 +0000 (22:23 +0200)]
Handle deleted base branch in PR (#10618) (#10619)

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoDelete dependencies when deleting a repository (#10608) (#10616)
zeripath [Thu, 5 Mar 2020 13:56:53 +0000 (13:56 +0000)]
Delete dependencies when deleting a repository (#10608) (#10616)

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>
4 years agoEnsure executable bit is kept on the web editor (#10607) (#10614)
Lunny Xiao [Thu, 5 Mar 2020 08:55:21 +0000 (16:55 +0800)]
Ensure executable bit is kept on the web editor (#10607) (#10614)

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
4 years agoUpdate mergebase in pr checker (#10586) (#10605)
guillep2k [Wed, 4 Mar 2020 21:56:09 +0000 (18:56 -0300)]
Update mergebase in pr checker (#10586) (#10605)

4 years agoBuild gitea1.11 with go1.13 (#10584)
techknowlogick [Tue, 3 Mar 2020 07:09:27 +0000 (02:09 -0500)]
Build gitea1.11 with go1.13 (#10584)

4 years agoLogout POST action (#10582) (#10585)
John Olheiser [Tue, 3 Mar 2020 05:54:15 +0000 (23:54 -0600)]
Logout POST action (#10582) (#10585)

* Change logout to POST

* Update for redirect

* Revert octicon to font

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoAdmin page for managing user e-mail activation (#10557) (#10579)
guillep2k [Mon, 2 Mar 2020 20:09:37 +0000 (17:09 -0300)]
Admin page for managing user e-mail activation (#10557) (#10579)

* Admin page for managing user e-mail activation (#10557)

* Implement mail activation admin panel

* Apply suggestions by @lunny

* Add UI for user activated emails

* Prevent admin from self-deactivate; add modal

Co-authored-by: zeripath <art27@cantab.net>
* Fix pagination options downgrade

Co-authored-by: zeripath <art27@cantab.net>
4 years agoFix migration bug on v96.go (#10572) (#10573)
guillep2k [Mon, 2 Mar 2020 16:32:20 +0000 (13:32 -0300)]
Fix migration bug on v96.go (#10572) (#10573)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years agoFix redirection path if Slack webhook channel is invalid (#10566)
James Lakin [Mon, 2 Mar 2020 11:54:07 +0000 (11:54 +0000)]
Fix redirection path if Slack webhook channel is invalid (#10566)

The path to the hook config is already defined by orgRepoCtx

4 years agohead.tmpl og:image picture location (#10531) (#10556)
6543 [Sun, 1 Mar 2020 20:33:18 +0000 (21:33 +0100)]
head.tmpl og:image picture location (#10531) (#10556)

* head.tmpl og:image picture location (#10531)

og:image picture location

* CI.restart()

* CI.restart()

Co-authored-by: FreeCipher <admin@freecipher.com>
4 years agoFix 404 after activating secondary email (backport of #10547) (#10553)
Andreas Shimokawa [Sun, 1 Mar 2020 12:27:13 +0000 (13:27 +0100)]
Fix 404 after activating secondary email (backport of #10547) (#10553)

4 years agoFix appearance of unsigned sha box in view_list (#10543) (#10544)
zeripath [Sat, 29 Feb 2020 15:20:32 +0000 (15:20 +0000)]
Fix appearance of unsigned sha box in view_list (#10543) (#10544)

Unfortunately the fix in #10511 was slightly incorrect and placed the
detail box at one level too far out.

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoShow Signer in commit lists and add basic trust (#10425) (#10524)
zeripath [Fri, 28 Feb 2020 17:18:02 +0000 (17:18 +0000)]
Show Signer in commit lists and add basic trust (#10425) (#10524)

Backport #10425
Backport #10511

* Show Signer in commit lists and add basic trust (#10425)

Show the avatar of the signer in the commit list pages as we do not
enforce that the signer is an author or committer. This makes it
clearer who has signed the commit.

Also display commits signed by non-members differently from
members and in particular make it clear when a non-member signer
is different from the committer to help reduce the risk of
spoofing.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Fix the signing icon in the  view_list.tmpl page (#10511)

Co-Authored-By: silverwind <me@silverwind.io>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoFix potential bugs (#10513) (#10518)
6543 [Fri, 28 Feb 2020 03:12:23 +0000 (04:12 +0100)]
Fix potential bugs (#10513) (#10518)

* use e if it is an option
* potential nil so check err first
* check err first
* m == nil already checked

4 years agoOrg action fixes and form cleanup (#10512) (#10514)
John Olheiser [Fri, 28 Feb 2020 01:38:21 +0000 (19:38 -0600)]
Org action fixes and form cleanup (#10512) (#10514)

* More org fixes

* Move form action query to inputs

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoUse [:space:] instead of \s (#10508) (#10509)
zeripath [Thu, 27 Feb 2020 19:12:10 +0000 (19:12 +0000)]
Use [:space:] instead of \s (#10508) (#10509)

Backport #10508

4 years ago[BugFix] Avoid mailing explicit unwatched (#10475) (#10500)
6543 [Thu, 27 Feb 2020 17:42:51 +0000 (18:42 +0100)]
[BugFix] Avoid mailing explicit unwatched (#10475) (#10500)

* [BugFix] Avoid mailing explicit unwatched (#10475)

4 years agoHandle push rejection message in Merge & Web Editor (#10373) (#10497)
zeripath [Thu, 27 Feb 2020 13:37:11 +0000 (13:37 +0000)]
Handle push rejection message in Merge & Web Editor (#10373) (#10497)

Backport #10373

* Handle push rejection message in Merge

* Fix sanitize, adjust message handling

* Handle push-rejection in webeditor CRUD too

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoFix SQLite concurrency problems by using BEGIN IMMEDIATE (#10368) (#10493)
guillep2k [Thu, 27 Feb 2020 02:30:57 +0000 (23:30 -0300)]
Fix SQLite concurrency problems by using BEGIN IMMEDIATE (#10368) (#10493)

4 years agoShow the username as a fallback on feeds if full name is blank (#10461)
James Lakin [Thu, 27 Feb 2020 01:59:07 +0000 (01:59 +0000)]
Show the username as a fallback on feeds if full name is blank (#10461)

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoFix double PR notification from API (#10482) (#10486)
John Olheiser [Wed, 26 Feb 2020 20:39:39 +0000 (14:39 -0600)]
Fix double PR notification from API (#10482) (#10486)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoFix admin notices (#10480) (#10483)
John Olheiser [Wed, 26 Feb 2020 17:14:37 +0000 (11:14 -0600)]
Fix admin notices (#10480) (#10483)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoChange admin dashboard to POST (#10465) (#10466)
John Olheiser [Tue, 25 Feb 2020 23:42:43 +0000 (17:42 -0600)]
Change admin dashboard to POST (#10465) (#10466)

* Change admin dashboard to POST (#10465)

* Add form and convert to POST

* Redirect for flash

* Convert octicons back to fa for 1.11

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoChange action GETs to POST (#10462) (#10464)
John Olheiser [Tue, 25 Feb 2020 21:08:21 +0000 (15:08 -0600)]
Change action GETs to POST (#10462) (#10464)

* Change action GETs to POST

* submite = submit + smite

* No more # href

* Fix test

* Match other tests

* Explicit csrf

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoUpdate markbates/goth (backport) (#10445)
oscar.lofwenhamn [Mon, 24 Feb 2020 18:19:25 +0000 (19:19 +0100)]
Update markbates/goth (backport) (#10445)

Update markbates/goth to v1.61.2
- Fixes a JWT decoding issue in the OpenID provider
- Updates the GitHub provider to use the authorization header for authentication
- Updates the Twitch provider for Twitch's v5 API changes
- Adds the email and is_private_email fields to the Apple provider's GetUser implementation
- Modifies gothic to export a non-collidable context key for setting the Provider in a context.Context
- Adds new scopes to the Spotify provider
- Adds the IDToken from OpenID providers on the user struct
- Make Apple provider's SecretParams public
- Adds support for sign in with Apple, and drops support for Go versions 1.7 and 1.8
- Fixes the Slack provider's FetchURL logic to use the appropriate scope for the info it needs
Signed-off-by: Oscar LÃfwenhamn <oscar.lofwenhamn@cgi.com>
4 years agoTrigger webhooks on issue label-change via API too (#10421) (#10439)
6543 [Mon, 24 Feb 2020 14:30:59 +0000 (15:30 +0100)]
Trigger webhooks on issue label-change via API too (#10421) (#10439)

* trigger webhooks with api too

* fix comment

* notify report old too

* CI restart

* restart CI again

* remove duplicated code

4 years agoFix webhook bug (#10427) (#10432)
Lunny Xiao [Mon, 24 Feb 2020 04:48:30 +0000 (12:48 +0800)]
Fix webhook bug (#10427) (#10432)

Co-authored-by: techknowlogick <matti@mdranta.net>
4 years agoVarious fixes in login sources (#10428) (#10429)
zeripath [Sun, 23 Feb 2020 20:46:17 +0000 (20:46 +0000)]
Various fixes in login sources (#10428) (#10429)

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoAdd frontend/backend make targets, fix source release (#10325) (#10414)
silverwind [Sat, 22 Feb 2020 11:51:58 +0000 (12:51 +0100)]
Add frontend/backend make targets, fix source release (#10325) (#10414)

* Add frontend/backend make targets, fix source release

- Add 'make backend' and 'make frontend' make targets which are used to
  build go and js/css/svg files respectively.

- The 'backend' target can be invoked without requiring Node.js to be
  present on the system if pre-built frontend assets are present like
  in the release source tarballs.

- Fix source releases missing 'dist' folders inside 'node_modules' which
  were erronously excluded from tar.

- Store VERSION in file VERSION for the release tarballs and prefer that
  file over git-derived version.

* fix release task

* fix typo

* fix another typo

Fixes: https://github.com/go-gitea/gitea/issues/10253
4 years agoPrevent panic on merge to PR (#10403) (#10408)
guillep2k [Fri, 21 Feb 2020 22:53:32 +0000 (19:53 -0300)]
Prevent panic on merge to PR (#10403) (#10408)

If you attempt to merge to a branch which on a PR there will be a nil pointer error in the pull request checker.

This panic is uncaught and will bring down the gitea server.

This PR adds protection to prevent this.

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