]> source.dussan.org Git - gitea.git/log
gitea.git
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)

4 years agoFix milestone API state parameter unhandled (#10049) (#10052)
Lunny Xiao [Wed, 29 Jan 2020 16:01:44 +0000 (00:01 +0800)]
Fix milestone API state parameter unhandled (#10049) (#10052)

* Fix milestone API state parameter unhandled

* Fix test

4 years agoEnsure that feeds are appropriately restricted (#10018) (#10019)
zeripath [Tue, 28 Jan 2020 21:54:09 +0000 (21:54 +0000)]
Ensure that feeds are appropriately restricted (#10018) (#10019)

* Ensure that feeds are appropriately restricted

* Placate golangci-lint

4 years agoPRs: Move to use a temporary repo for pushing new prs (#10009) (#10042)
zeripath [Tue, 28 Jan 2020 18:46:59 +0000 (18:46 +0000)]
PRs: Move to use a temporary repo for pushing new prs (#10009) (#10042)

* Move to use a temporary repo for pushing new prs

4 years agoFix wiki raw view on sub path (#10002) (#10040)
Lunny Xiao [Tue, 28 Jan 2020 15:10:25 +0000 (23:10 +0800)]
Fix wiki raw view on sub path (#10002) (#10040)

* Fix wiki raw view on sub path

* Add test for subpath wiki raw file

* Fix bug

4 years agotrim whitespace of MilestoneName at creation/rename (#10017) (#10034)
6543 [Tue, 28 Jan 2020 08:52:24 +0000 (09:52 +0100)]
trim whitespace of MilestoneName at creation/rename (#10017) (#10034)

4 years agoSanitize credentials in mirror form (#9975) (#9991)
Lunny Xiao [Sun, 26 Jan 2020 08:16:53 +0000 (16:16 +0800)]
Sanitize credentials in mirror form (#9975) (#9991)

4 years agoFix pull view when head repository or head branch missed and close related pull reque...
Lunny Xiao [Sat, 25 Jan 2020 09:39:53 +0000 (17:39 +0800)]
Fix pull view when head repository or head branch missed and close related pull requests when delete head repository or head branch (#9927) (#9974)

* fix pull view when head repository or head branch missed and close related pull requests when delete branch

* fix pull view broken when head repository deleted

* close pull requests when head repositories deleted

* Add tests for broken pull request head repository or branch

* fix typo

* ignore special error when close pull request

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoSwitch to use -f instead of -F for sendmail (#9961) (#9970)
techknowlogick [Sat, 25 Jan 2020 01:45:53 +0000 (20:45 -0500)]
Switch to use -f instead of -F for sendmail (#9961) (#9970)

Fix #9385

Co-authored-by: zeripath <art27@cantab.net>
4 years agoFix check for push on default branch (#9963)
guillep2k [Sat, 25 Jan 2020 00:56:30 +0000 (21:56 -0300)]
Fix check for push on default branch (#9963)

Co-authored-by: techknowlogick <matti@mdranta.net>
4 years agoFix file rename/copy not supported by indexer (#9967)
guillep2k [Fri, 24 Jan 2020 23:25:00 +0000 (20:25 -0300)]
Fix file rename/copy not supported by indexer (#9967)

4 years agoFix regression with tag test running (#9941) v1.11.0-rc2
techknowlogick [Wed, 22 Jan 2020 20:49:08 +0000 (15:49 -0500)]
Fix regression with tag test running (#9941)

4 years agoChangelog 1.11.0-rc2 (#9853)
John Olheiser [Wed, 22 Jan 2020 19:56:55 +0000 (13:56 -0600)]
Changelog 1.11.0-rc2 (#9853)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoDon't convert ellipsis in markdown (#9905) (#9937)
John Olheiser [Wed, 22 Jan 2020 16:24:04 +0000 (10:24 -0600)]
Don't convert ellipsis in markdown (#9905) (#9937)

* Don't convert ellipsis

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

Co-Authored-By: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
4 years agoFixed repo link in generated comment for cross repository dependency (#9863) (#9935)
6543 [Wed, 22 Jan 2020 10:54:40 +0000 (11:54 +0100)]
Fixed repo link in generated comment for cross repository dependency (#9863) (#9935)

* fixed link to issue in issue comments after adding/removing a dependency, before links assumed the issue was in the same repository. also changed the format of the displayed issue since the issue will not necessarily be in the same repo

* based on pr comments, changed to use HTMLURL instead of piecing together the issue url, and added an if statement around the issue link display as a nil protection

* only showing repo name in dependency comment if the issue is from another repo

Co-authored-by: Brad Albright <32200834+bhalbright@users.noreply.github.com>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
4 years agoCheck if diff actually contains sections when rendering (#9926) (#9933)
Lauris BH [Wed, 22 Jan 2020 08:02:57 +0000 (10:02 +0200)]
Check if diff actually contains sections when rendering (#9926) (#9933)

4 years agoFix wrong hint when status checking is running on pull request view (#9886) (#9928)
Lunny Xiao [Wed, 22 Jan 2020 06:06:11 +0000 (14:06 +0800)]
Fix wrong hint when status checking is running on pull request view (#9886) (#9928)

* Fix wrong hint when status checking is running on pull request view

* fix lint

* fix test

* fix test

* fix wrong tmpl

* fix import

* rename function name

4 years agoFix RocketChat (#9908) (#9921)
John Olheiser [Tue, 21 Jan 2020 22:24:18 +0000 (16:24 -0600)]
Fix RocketChat (#9908) (#9921)

* Fix RocketChat??

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Don't send attachment for repo create/delete

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Make fmt

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoDo not try to recreate ldap user if they are already created (#9900) (#9919)
zeripath [Tue, 21 Jan 2020 20:17:00 +0000 (20:17 +0000)]
Do not try to recreate ldap user if they are already created (#9900) (#9919)

* Do not try to recreate ldap user if they are already created

* just remove autoregister

Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: techknowlogick <matti@mdranta.net>
4 years agoUpdate queue_redis.go (#9911)
zeripath [Tue, 21 Jan 2020 12:02:25 +0000 (12:02 +0000)]
Update queue_redis.go (#9911)

4 years agoAdd option to prevent LDAP from deactivating everything on empty search (#9879) ...
zeripath [Mon, 20 Jan 2020 19:18:23 +0000 (19:18 +0000)]
Add option to prevent LDAP from deactivating everything on empty search (#9879) (#9896)

* Add option to prevent LDAP from deactivating everything on empty search

* Update options/locale/locale_en-US.ini

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years agoFix wrong permissions check when issues/prs shared operations (#9885) (#9889)
Lunny Xiao [Mon, 20 Jan 2020 15:59:33 +0000 (23:59 +0800)]
Fix wrong permissions check when issues/prs shared operations (#9885) (#9889)

* Fix wrong permissions check when issues/prs shared operations

* move redirect to the last of the function

* fix swagger

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoCheck user != nil before checking values (#9881) (#9883)
6543 [Mon, 20 Jan 2020 03:01:39 +0000 (04:01 +0100)]
Check user != nil before checking values (#9881) (#9883)

* Check user != nil before checking values

* Handle autoAdmin

Co-authored-by: zeripath <art27@cantab.net>
4 years agoAllow hyphen in language name (#9873) (#9880)
zeripath [Mon, 20 Jan 2020 00:23:35 +0000 (00:23 +0000)]
Allow hyphen in language name (#9873) (#9880)

Co-authored-by: techknowlogick <matti@mdranta.net>
4 years agoEnsure that 2fa is checked on reset-password (#9857) (#9876)
zeripath [Sun, 19 Jan 2020 23:21:21 +0000 (23:21 +0000)]
Ensure that 2fa is checked on reset-password (#9857) (#9876)

* Ensure that 2fa is checked on reset-password

* Apply suggestions from code review

Co-Authored-By: Lauris BH <lauris@nix.lv>
* Properly manage scratch_code regeneration

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago[Backport] CI optimisation & add github token env var (#9875)
6543 [Sun, 19 Jan 2020 22:21:54 +0000 (23:21 +0100)]
[Backport] CI optimisation & add github token env var (#9875)

* ci: use docker image for golangci-lint (#9737)

* ci: re-ordering Drone CI for optimizing time (#9719)

* ci: try re-ordering for optimizing time

* ci: try re-ordering for optimizing time

* ci: try re-ordering for optimizing time

* ci: try re-ordering for optimizing time

* ci: try re-ordering for optimizing time

* ci: try re-ordering for optimizing time

* ci: try offloading mysql8 to arm64

* Revert "ci: try offloading mysql8 to arm64"

This reverts commit c60de5db1cf8b5984c3014a57da6490f06c8d980.

* ci: try offloading pgsql to arm64

* ci: activate ldap on arm64

* ci: test mysql8 in place pgsql arm64

* chore: clean un-needed move

* typo

* ci: revert runnning mysql on arm64

* ci: run compliance on arm

* chore: limit change

* chore: readd maybe need for release fetch-tags

* ci: remove docker-linux-amd64-dry-run

* ci: remove docker-linux-amd64-dry-run

* Revert "ci: remove docker-linux-amd64-dry-run"

This reverts commit 0715f65b11c37869359aaaa5d22901da512e8184.

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* ci: use new mssql image (#9720)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* ci: run notify on arm64 (#9762)

* ci: run notify on arm64

Free one jobs on amrd64

* Update .drone.yml

* Update .drone.yml

* Update .drone.yml

Based on: https://github.com/appleboy/drone-discord/blob/master/.drone.yml#L339

* improve trigger

Co-authored-by: techknowlogick <matti@mdranta.net>
* ci: move some integration tests on arm64 (#9747)

* tests: configure github remaining limit + read token (#9800)

* ci: configure remaining github limmit

* prepend with github since package is common to all migrations

* add RefreshRate

* Update github.go

* add missing space

* go fmt

* Read env variable GITHUB_READ_TOKEN for token

* Update .drone.yml

* ci: simplify tag/release by always running coverage (#9774)

* ci: simplify tag/release by always running coverage

* use mod and vendor for unit test coverage

* remove not needed lfs for unit test

* use arm drone agent for docs (#9776)

* run translations pipeline on arm server (#9865)

* add git-check to Makefile

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <matti@mdranta.net>
4 years agoMake CertFile and KeyFile relative to CustomPath (#9868) (#9874)
zeripath [Sun, 19 Jan 2020 19:59:30 +0000 (19:59 +0000)]
Make CertFile and KeyFile relative to CustomPath (#9868) (#9874)

* Make CertFile and KeyFile relative to CustomPath

The current code will absolute CertFile and KeyFile against the current working directory. This is quite unexpected for users. This code makes relative paths absolute against the CustomPath.

Fix #4196

* Improve error reporting when reading certificates

* Apply suggestions from code review

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoFix issues/pulls dependencies problems (#9842) (#9864)
Lunny Xiao [Sun, 19 Jan 2020 17:56:57 +0000 (01:56 +0800)]
Fix issues/pulls dependencies problems (#9842) (#9864)

* Fix issues/pulls dependencies problems

* fix swagger and api param name

* fix js

4 years agoExplicitly refer to PR in squash-merge commit message in case of external tracker...
David Svantesson [Sat, 18 Jan 2020 14:28:33 +0000 (15:28 +0100)]
Explicitly refer to PR in squash-merge commit message in case of external tracker (#9844) (#9855)

* Explicitly refer to PR in squash-merge commit message in case of external tracker

* documentation

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
4 years agofix (#9837)
6543 [Sat, 18 Jan 2020 04:31:46 +0000 (05:31 +0100)]
fix (#9837)

4 years agoChangelog 1.10.3 (#9832) (#9849)
6543 [Fri, 17 Jan 2020 22:02:30 +0000 (23:02 +0100)]
Changelog 1.10.3 (#9832) (#9849)

4 years agoFix markdown anchor links (#9673) (#9840)
Moritz [Fri, 17 Jan 2020 16:49:50 +0000 (17:49 +0100)]
Fix markdown anchor links (#9673) (#9840)

4 years agoFix download file wrong content-type (#9825) (#9834)
Lunny Xiao [Fri, 17 Jan 2020 14:11:20 +0000 (22:11 +0800)]
Fix download file wrong content-type (#9825) (#9834)

* Fix download file wrong content-type

* change the error text to be more precise

* fix test

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoFix wrong identify poster on a migrated pull request when submi… (#9827) (#9830)
Lunny Xiao [Fri, 17 Jan 2020 12:38:11 +0000 (20:38 +0800)]
Fix wrong identify poster on a migrated pull request when submi… (#9827) (#9830)

4 years agofix dump non-exist log directory (#9818) (#9819)
Lunny Xiao [Fri, 17 Jan 2020 05:02:41 +0000 (13:02 +0800)]
fix dump non-exist log directory (#9818) (#9819)

4 years agoFix compare (#9808) (#9814)
Lunny Xiao [Fri, 17 Jan 2020 02:08:28 +0000 (10:08 +0800)]
Fix compare (#9808) (#9814)

Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: techknowlogick <matti@mdranta.net>
4 years agoFix push-to-create (#9772) (#9797)
John Olheiser [Thu, 16 Jan 2020 05:40:37 +0000 (23:40 -0600)]
Fix push-to-create (#9772) (#9797)

* Fix push-to-create

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Check URL path and service

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Send dummy payload on receive-pack GET

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* The space was actually a NUL byte

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Use real bare repo instead of manufactured payload

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
4 years agoFix missing msteam webhook on organization (#9781) (#9794)
Lunny Xiao [Thu, 16 Jan 2020 03:09:47 +0000 (11:09 +0800)]
Fix missing msteam webhook on organization (#9781) (#9794)

4 years agoFix missing unlock in uniquequeue (#9791)
zeripath [Thu, 16 Jan 2020 00:09:31 +0000 (00:09 +0000)]
Fix missing unlock in uniquequeue (#9791)

4 years agoFix (#9761) Korean locales (#9780)
6543 [Wed, 15 Jan 2020 16:28:44 +0000 (17:28 +0100)]
Fix (#9761) Korean locales (#9780)

* backport korean 20-20-01-15 | fix #9761

* update state 14:43:10 UTC

4 years agoFix add team on collaborator page when same name as organization (#9778)
David Svantesson [Wed, 15 Jan 2020 13:18:18 +0000 (14:18 +0100)]
Fix add team on collaborator page when same name as organization (#9778)

4 years agoBackport Locales [2020-01-14] (#9773)
6543 [Wed, 15 Jan 2020 07:03:38 +0000 (08:03 +0100)]
Backport Locales [2020-01-14] (#9773)

* backport state of 2020-01-14

* Apply suggestions from code review

Co-Authored-By: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
4 years agoFix SimpleMDE quote reply (#9757) (#9768)
John Olheiser [Wed, 15 Jan 2020 02:23:55 +0000 (20:23 -0600)]
Fix SimpleMDE quote reply (#9757) (#9768)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
4 years agoFix #9752 (#9769) (#9775)
6543 [Wed, 15 Jan 2020 00:41:28 +0000 (01:41 +0100)]
Fix #9752 (#9769) (#9775)

Co-authored-by: zeripath <art27@cantab.net>
4 years agoFix milestones page (#9771)
6543 [Tue, 14 Jan 2020 22:33:12 +0000 (23:33 +0100)]
Fix milestones page (#9771)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: John Olheiser <42128690+jolheiser@users.noreply.github.com>
4 years agoFix missing updated time on migrated issues and comments (#9744) (#9764)
Lunny Xiao [Tue, 14 Jan 2020 16:55:03 +0000 (00:55 +0800)]
Fix missing updated time on migrated issues and comments (#9744) (#9764)

* Fix missing updated time on migrated issues and comments

* Fix testing and missing updated on migrating pullrequest

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
4 years agofix webpack polyfills (#9735) (#9738)
silverwind [Sun, 12 Jan 2020 22:43:16 +0000 (23:43 +0100)]
fix webpack polyfills (#9735) (#9738)

webpack polyfills did not work because useBuiltIns: 'entry' expects a
explicit core-js import. Changed it to 'usage' which does not require
these explicit imports and polyfills based on browserslist.

As a result, the built index.js now went from 128kB to 192kB.

Ref: https://babeljs.io/docs/en/babel-preset-env#usebuiltins

4 years agoMove Errored PRs out of StatusChecking (#9675) (#9726)
zeripath [Sun, 12 Jan 2020 19:52:40 +0000 (19:52 +0000)]
Move Errored PRs out of StatusChecking (#9675) (#9726)

* Move Errored PRs out of StatusChecking (#9675)

* Set Errored PRs out of StatusChecking

* Ensure that api status is correctly set too

* Update models/pull.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>
Co-authored-by: John Olheiser <42128690+jolheiser@users.noreply.github.com>
* Update services/pull/check.go

Co-authored-by: John Olheiser <42128690+jolheiser@users.noreply.github.com>
4 years agoMake hook status printing configurable with delay (#9641) (#9725)
zeripath [Sun, 12 Jan 2020 18:02:36 +0000 (18:02 +0000)]
Make hook status printing configurable with delay (#9641) (#9725)

* Delay printing hook statuses until after 1 second

* Move to a 5s delay, wrapped writer structure and add config

* Update cmd/hook.go

* Apply suggestions from code review

* Update cmd/hook.go

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
4 years ago[BugFix] [API] ​/repos​/issues​/search (#9698) (#9724)
6543 [Sun, 12 Jan 2020 10:20:49 +0000 (11:20 +0100)]
[BugFix] [API] ​/repos​/issues​/search (#9698) (#9724)

* fix

* fix options

* add TEST

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
4 years agosilence fomantic error regarding tabs (#9713) (#9718)
silverwind [Sun, 12 Jan 2020 04:20:33 +0000 (05:20 +0100)]
silence fomantic error regarding tabs (#9713) (#9718)

Fomantic expects all tabs to have a target element with content as
defined by the data-tab attribute. All our usage of the tab module seems
to use <a> element tabs that link to new pages so these content elements
are never present and fomantic complains about that in the console with
an "Activated tab cannot be found" error. This silences that error.

4 years agoRemove unused lock (#9710)
zeripath [Sat, 11 Jan 2020 19:06:39 +0000 (19:06 +0000)]
Remove unused lock (#9710)

4 years agoMissed q.lock.Unlock() will cause panic (#9706)
zeripath [Sat, 11 Jan 2020 17:05:24 +0000 (17:05 +0000)]
Missed q.lock.Unlock() will cause panic (#9706)

4 years agoNever allow an empty password to validate (#9682) (#9683)
zeripath [Sat, 11 Jan 2020 14:27:03 +0000 (14:27 +0000)]
Never allow an empty password to validate (#9682) (#9683)

* Restore IsPasswordSet previous value

* Update models/user.go

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoDon't attempt to close issue if already closed (#9699)
guillep2k [Sat, 11 Jan 2020 06:42:11 +0000 (03:42 -0300)]
Don't attempt to close issue if already closed (#9699)

4 years agoLoad milestone in API PR list (#9671) (#9700)
John Olheiser [Sat, 11 Jan 2020 03:58:03 +0000 (21:58 -0600)]
Load milestone in API PR list (#9671) (#9700)

4 years agoeliminate horizontal scroll caused by footer (#9674)
silverwind [Fri, 10 Jan 2020 00:45:59 +0000 (01:45 +0100)]
eliminate horizontal scroll caused by footer (#9674)

Co-authored-by: zeripath <art27@cantab.net>
4 years agoremove google font call (#9668) (#9681)
techknowlogick [Thu, 9 Jan 2020 21:40:57 +0000 (16:40 -0500)]
remove google font call (#9668) (#9681)