]> source.dussan.org Git - gitea.git/log
gitea.git
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>
4 years agoupdate crypto vendors (#10398)
guillep2k [Fri, 21 Feb 2020 14:27:19 +0000 (11:27 -0300)]
update crypto vendors (#10398)

Co-authored-by: @techknowlogick
4 years agoEnsure only own addresses are updated (#10397) (#10399)
guillep2k [Fri, 21 Feb 2020 13:35:17 +0000 (10:35 -0300)]
Ensure only own addresses are updated (#10397) (#10399)

4 years agoFix wrong num closed issues on repository when close issue via commit (#10364) (...
Lunny Xiao [Thu, 20 Feb 2020 14:52:19 +0000 (22:52 +0800)]
Fix wrong num closed issues on repository when close issue via commit (#10364) (#10380)

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoReading pull attachments should depend on read UnitTypePullRequests (#10346) (#10354)
guillep2k [Wed, 19 Feb 2020 03:02:50 +0000 (00:02 -0300)]
Reading pull attachments should depend on read UnitTypePullRequests (#10346) (#10354)

Co-authored-by: zeripath <art27@cantab.net>
4 years agoSet max-width on review-box comment box (#10348) (#10353)
6543 [Wed, 19 Feb 2020 00:59:14 +0000 (01:59 +0100)]
Set max-width on review-box comment box (#10348) (#10353)

Co-authored-by: zeripath <art27@cantab.net>
4 years agoPrevent nil pointer in GetPullRequestCommitStatusState (#10342) (#10344)
zeripath [Tue, 18 Feb 2020 20:04:10 +0000 (20:04 +0000)]
Prevent nil pointer in GetPullRequestCommitStatusState (#10342) (#10344)

Backport #10344

Ensure that pr.HeadRepo is loaded before using it in GetPullRequestCommitStatusState.

Fixes error on merging with successful commit merge statuses.

4 years agoFix status check enable (#10341) (#10343)
John Olheiser [Tue, 18 Feb 2020 19:34:50 +0000 (13:34 -0600)]
Fix status check enable (#10341) (#10343)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoTruncate long commit message header (#10301) (#10319)
zeripath [Tue, 18 Feb 2020 07:51:39 +0000 (07:51 +0000)]
Truncate long commit message header (#10301) (#10319)

* Truncate long commit message header

* Fix overflow in view commit table

* Use @media less

* Further improvements

* Fix the commit message on small screens

* adjust width of minimal table

4 years agoSet the initial commit status to Success otherwise it will always be Pending (#10317...
zeripath [Mon, 17 Feb 2020 20:50:59 +0000 (20:50 +0000)]
Set the initial commit status to Success otherwise it will always be Pending (#10317) (#10318)

Backport #10317

The commit status code has a bug whereby setting the initial status to Pending means you can never have the status of Success - it should be set to Success.

4 years agoDon't manually replace whitespace during render (#10291) (#10315)
mrsdizzie [Mon, 17 Feb 2020 17:46:28 +0000 (12:46 -0500)]
Don't manually replace whitespace during render (#10291) (#10315)

* Don't manually replace whitespace during render

For historical reasons Gitea manually alters the urlPrefix and replaces
a whitespace with a +. This Works for URLs, but we're also passing
urlPrefix to git calls and adding the + is breaking the tree path.

Goldmark will automatically convert a white space to the proper %20, so
we should leave the string as is which lets us pass it to git unmodified
and then let Goldmark fix it.

Also fixed separate bug in URLJoin I noticed while testing where it will
silently discard sections of a path that have # in them (possibly
others). We should just escape it first.

Fixes 10156

* Escape elems as well

* Revert "Escape elems as well"

This reverts commit 8bf49596fee6fac4d9da256cd1e90a0ec0183671.

* restart ci

* remove changes to URLJoin

* restart ci

Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: techknowlogick <matti@mdranta.net>
4 years agoCreate Changelog for v1.11.1 release (#10286) v1.11.1
zeripath [Sun, 16 Feb 2020 23:22:39 +0000 (23:22 +0000)]
Create Changelog for v1.11.1 release (#10286)

* Create Changelog

* Update CHANGELOG.md

Co-Authored-By: techknowlogick <matti@mdranta.net>
* Include

Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
4 years agofix: set explicit POSTGRES_PASSWORD for pgsql on drone CI (#10303)
Antoine GIRARD [Sun, 16 Feb 2020 21:38:54 +0000 (22:38 +0100)]
fix: set explicit POSTGRES_PASSWORD for pgsql on drone CI (#10303)

4 years agov1.10.4 Changelog (#10294) (#10305)
zeripath [Sun, 16 Feb 2020 21:38:06 +0000 (21:38 +0000)]
v1.10.4 Changelog (#10294) (#10305)

* v1.10.4 Changelog

* Add backport identifier for #10261

* Update CHANGELOG.md entry for #9884

4 years agomake: add release-sources #10295 (#10298)
Antoine GIRARD [Sun, 16 Feb 2020 18:23:41 +0000 (19:23 +0100)]
make: add release-sources #10295 (#10298)

* make: add release-sources

* make: release-sources exclude .git and make_evidence

* fix: skip exclude MAKE_EVIDENCE_DIR not present in 1.11

4 years agoBlacklist manifest.json & milestones user (#10292) (#10293)
zeripath [Sun, 16 Feb 2020 11:20:59 +0000 (11:20 +0000)]
Blacklist manifest.json & milestones user (#10292) (#10293)

Fix #10290

Co-authored-by: techknowlogick <matti@mdranta.net>
4 years agoRepo name added to automatically generated commit message when mergin… (#9997) (...
zeripath [Sat, 15 Feb 2020 21:17:01 +0000 (21:17 +0000)]
Repo name added to automatically generated commit message when mergin… (#9997) (#10285)

* Repo name added to automatically generated commit message when merging pull request

* As per @lunny

Co-authored-by: Shashvat Kedia <sk261@snu.edu.in>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoFix Workerpool deadlock (#10283) (#10284)
zeripath [Sat, 15 Feb 2020 19:28:25 +0000 (19:28 +0000)]
Fix Workerpool deadlock (#10283) (#10284)

* Prevent deadlock on boost

* Force a boost in testchannelqueue

4 years agoDivide GetIssueStats query in smaller chunks (#10176) (#10282)
guillep2k [Sat, 15 Feb 2020 17:07:09 +0000 (14:07 -0300)]
Divide GetIssueStats query in smaller chunks (#10176) (#10282)

* Divide GetIssueStats query in smaller chunks

* Skip chunking if count is low enough

* Fix lint

* Define maxQueryParameters

* Remove absMaxQueryParameters because of lint

* Restart CI

* Restart CI

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoFix reply on code review (#10227) (#10257)
Lunny Xiao [Thu, 13 Feb 2020 09:32:30 +0000 (17:32 +0800)]
Fix reply on code review (#10227) (#10257)

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
4 years agoStop hanging issue indexer initialisation from preventing shutdown (#10243) (#10249)
zeripath [Wed, 12 Feb 2020 10:22:10 +0000 (10:22 +0000)]
Stop hanging issue indexer initialisation from preventing shutdown (#10243) (#10249)

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
4 years agofix filter label emoji width (#10241) (#10244)
jaqra [Tue, 11 Feb 2020 23:39:06 +0000 (02:39 +0300)]
fix filter label emoji width (#10241) (#10244)

4 years agoFix issue sidebar menus having an infinite height (#10240)
James Lakin [Tue, 11 Feb 2020 21:26:33 +0000 (21:26 +0000)]
Fix issue sidebar menus having an infinite height (#10240)

4 years agoFix commit between two commits calculation if there is only last commit (#10225)...
Lauris BH [Tue, 11 Feb 2020 03:10:12 +0000 (05:10 +0200)]
Fix commit between two commits calculation if there is only last commit (#10225) (#10226)

4 years agoOnly check for conflicts/merging if the PR has not been merged in the interim (#10132...
6543 [Mon, 10 Feb 2020 13:09:08 +0000 (14:09 +0100)]
Only check for conflicts/merging if the PR has not been merged in the interim (#10132) (#10206)

* Only check for conflicts/merging if the PR has not been merged in the interim (#10132)

* Only check for merging if the PR has not been merged in the interim

* fixup! Only check for merging if the PR has not been merged in the interim

* Try to fix test failure

* Use PR2 not PR1 in tests as PR1 merges automatically

* return already merged error

* enforce locking

* move pullrequest checking to after merge

This might improve the chance that the race does not affect us but does not prevent it.

* Remove minor race with getting merge commit id

move check pr after merge

* Remove unnecessary prepareTestEnv - onGiteaRun does this for us

* Add information about when merging occuring

* More logging

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* re order

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoChangelog 1.11.0 (#10204) v1.11.0
John Olheiser [Mon, 10 Feb 2020 11:34:30 +0000 (05:34 -0600)]
Changelog 1.11.0 (#10204)

* Changelog 1.11.0

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Backport snackport

Co-Authored-By: techknowlogick <matti@mdranta.net>
* Update CHANGELOG.md

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoFix followers and following tabs in profile (#10202) (#10203)
Lauris BH [Sun, 9 Feb 2020 21:00:24 +0000 (23:00 +0200)]
Fix followers and following tabs in profile (#10202) (#10203)

4 years agoFix code-expansion arc-green theme bug (#10180) (#10185)
6543 [Fri, 7 Feb 2020 23:04:03 +0000 (00:04 +0100)]
Fix code-expansion arc-green theme bug (#10180) (#10185)

* fix code-expansion theme bug

* working solution without important

* no new color

* the midle

4 years agoAllow emoji on review head comments (#10159) (#10174)
guillep2k [Fri, 7 Feb 2020 20:39:24 +0000 (17:39 -0300)]
Allow emoji on review head comments (#10159) (#10174)

Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
4 years agoPrevent double waitgroup decrement (#10170) (#10175)
guillep2k [Fri, 7 Feb 2020 17:12:49 +0000 (14:12 -0300)]
Prevent double waitgroup decrement (#10170) (#10175)

* Prevent double waitgroup decrement

Co-authored-by: zeripath <art27@cantab.net>
4 years agoFix issue/pull link (#10158) (#10173)
guillep2k [Fri, 7 Feb 2020 03:51:23 +0000 (00:51 -0300)]
Fix issue/pull link (#10158) (#10173)

4 years agoFix push-create SSH bugs (#10145) (#10151)
John Olheiser [Wed, 5 Feb 2020 14:50:06 +0000 (08:50 -0600)]
Fix push-create SSH bugs (#10145) (#10151)

* Attempt to fix push-create SSH bugs

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix binding

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Invalid ctx

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoPrevent DeleteUser API abuse (#10125) (#10128)
6543 [Mon, 3 Feb 2020 17:44:06 +0000 (18:44 +0100)]
Prevent DeleteUser API abuse (#10125) (#10128)

* fix & co

* word suggestions from @jolheiser

4 years agoworking part of #9998 (#10114) (#10115)
6543 [Mon, 3 Feb 2020 03:19:04 +0000 (04:19 +0100)]
working part of #9998 (#10114) (#10115)

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
4 years agoAdd button to revert SimpleMDE to plain textarea (#10099) (#10102)
zeripath [Sat, 1 Feb 2020 20:24:58 +0000 (20:24 +0000)]
Add button to revert SimpleMDE to plain textarea (#10099) (#10102)

4 years agoFix branch page pull request title and link error (#10092) (#10097)
Lunny Xiao [Sat, 1 Feb 2020 15:14:56 +0000 (23:14 +0800)]
Fix branch page pull request title and link error (#10092) (#10097)

* Fix branch page pull request title and link error (#10092)

4 years ago[BugFix] [API] Pull.API.Convert: Only try to get HeadBranch if HeadRepo exist (#10029...
6543 [Sat, 1 Feb 2020 01:49:45 +0000 (02:49 +0100)]
[BugFix] [API] Pull.API.Convert: Only try to get HeadBranch if HeadRepo exist (#10029) (#10088)

4 years agoUpdate topics repo count when deleting repository (#10081)
Lauris BH [Fri, 31 Jan 2020 08:04:49 +0000 (10:04 +0200)]
Update topics repo count when deleting repository (#10081)

4 years ago[UI] Show pull icon on pull (#10061) (#10062)
6543 [Wed, 29 Jan 2020 20:40:43 +0000 (21:40 +0100)]
[UI] Show pull icon on pull (#10061) (#10062)