Commit graph

8427 commits

Author SHA1 Message Date
silverwind
f0aaffeedc Add USE_SERVICE_WORKER setting (#9110)
* Add USE_SERVICE_WORKER setting

This will be very useful setting for anyone doing frontend work.

Fixes: https://github.com/go-gitea/gitea/issues/9044

* prevent potential syntax error on old browsers
2019-11-21 15:06:23 -05:00
zeripath
cbaa1de9ec Add Graceful shutdown for Windows and hooks for shutdown of goroutines (#8964)
* Graceful Shutdown for windows and others

Restructures modules/graceful, adding shutdown for windows, removing and
replacing the old minwinsvc code.

Creates a new waitGroup - terminate which allows for goroutines to
finish up after the shutdown of the servers.

Shutdown and terminate hooks are added for goroutines.

* Remove unused functions - these can be added in a different PR

* Add startup timeout functionality

* Document STARTUP_TIMEOUT
2019-11-21 13:32:02 -05:00
Lunny Xiao
d7ac9727bb Move merge actions to notification (#9024)
* Move merge actions to notification

* Add missing mail notification
2019-11-21 12:08:42 -05:00
Lunny Xiao
d5261b9aab Move HttpBackend function to Http to reduce function calls when git smart http requests (#9057) 2019-11-21 11:24:43 -05:00
maicss
51ed4cc063 [fix] typo (#9104) 2019-11-21 21:27:05 +08:00
John Olheiser
dd82e401fd Add template repositories to comparison (#9101)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-11-20 17:23:45 -05:00
John Olheiser
8f49b1232a Fix nil context user (#9099)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-11-20 19:44:35 +00:00
Jordan
1615b3c187 Hide given credentials for migrated repos. (#9097)
CloneAddr was being saved as OriginalURL.

Now passing OriginalURL through from the form and
saving it in it's place
2019-11-20 13:01:09 -05:00
6543
2ab8c78c30 Refactor Issues Subscription (#8738)
* FIX: getIssueWatchers() get only aktive suscriber

* save query to work later with it or not ...

* fix test + add new case

* corect tests + GetIssueWatch

* API issue_subscripton: Put/Delete require tocken

* remove redundant code

* swagger specify return value

* remove unused binding

* remove note
because I'll implement this in a different way and in another PR

* ID should be unique!

* use xorm session

* Revert "use xorm session"

This reverts commit c1de540147199f2f1a8dd0d008f54af3603e2229.

* better test code
* more acurate comments
* use assert.False/True instead of Equal

* use more assert methodes
2019-11-20 22:50:54 +08:00
GiteaBot
dfd8b94923 [skip ci] Updated translations via Crowdin 2019-11-20 11:58:10 +00:00
David Svantesson
69a255defb Team permission to create repository in organization (#8312)
* Add team permission setting to allow creating repo in organization.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Add test case for creating repo when have team creation access.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* build error: should omit comparison to bool constant

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Add comment on exported functions

* Fix fixture consistency, fix existing unit tests

* Fix boolean comparison in xorm query.

* addCollaborator and changeCollaborationAccessMode separate steps

More clear to use different if-cases.

* Create and commit xorm session

* fix

* Add information of create repo permission in team sidebar

* Add migration step

* Clarify that repository creator will be administrator.

* Fix some things after merge

* Fix language text that use html

* migrations file

* Create repository permission -> Create repositories

* fix merge

* fix review comments
2019-11-20 19:27:49 +08:00
David Svantesson
35c3ea952a Explore page: Add topic param to pagination (#9077) (#9078) 2019-11-20 04:07:09 -05:00
guillep2k
a85d916d3e Fix doc example for asciidoc (#9072)
* Fix doc example for asciidoc

* Update config-cheat-sheet.en-us.md

* Update docs/content/doc/advanced/config-cheat-sheet.en-us.md

Co-Authored-By: Lauris BH <lauris@nix.lv>
2019-11-20 01:17:14 -05:00
GiteaBot
a88a58a83e [skip ci] Updated translations via Crowdin 2019-11-20 05:34:34 +00:00
techknowlogick
05f6eccf27
update golang.org/x/crypto vendor to use acme v2 (#9056) 2019-11-20 00:30:46 -05:00
GiteaBot
108bed2023 [skip ci] Updated translations via Crowdin 2019-11-20 00:16:19 +00:00
guillep2k
e4ec32de2e Fix password checks on admin create/edit user (#9076)
* Fix password checks on admin create/edit user

* Remove incorrect trimspace
2019-11-20 00:07:51 +00:00
GiteaBot
4a357f4188 [skip ci] Updated translations via Crowdin 2019-11-19 23:06:30 +00:00
guillep2k
c57edb6c7b Add password requirement info on error (#9074)
* Add password requirement info on error

* Move BuildComplexityError to the password pkg

* Unexport complexity type

* Fix extra line

* Update modules/password/password.go

Co-Authored-By: Lauris BH <lauris@nix.lv>
2019-11-19 22:44:58 +00:00
John Olheiser
eb0359cad4 Context menus for comments (#9043)
* Add quote replies

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-11-19 20:33:42 +02:00
GiteaBot
af7f08bca8 [skip ci] Updated translations via Crowdin 2019-11-19 07:37:59 +00:00
Iwasa Kazmi
5a3af7992c fix placeholders in the error message (#9060) 2019-11-19 07:35:37 +00:00
GiteaBot
9ccb50f162 [skip ci] Updated translations via Crowdin 2019-11-19 00:06:09 +00:00
guillep2k
2c2b9718e6 Avoid re-issuing redundant cross-references. (#8734)
* Avoid re-issuing redundant cross-references.

* Remove unused func; fix lint

* Simplify code as suggested by @laftriks

* Update test
2019-11-19 01:43:03 +02:00
Antoine GIRARD
f128e06ea6 fix: add search to reserved usernames (#9063)
* fix: add search to reserved usernames

* Update integrations/user_test.go

Co-Authored-By: 6543 <24977596+6543@users.noreply.github.com>
2019-11-18 15:03:25 -05:00
GiteaBot
d338e8238f [skip ci] Updated translations via Crowdin 2019-11-18 17:06:44 +00:00
guillep2k
64769c8a6b Allow authors to use act keywords in PR content (#9059) 2019-11-18 19:03:49 +02:00
guillep2k
b15f26b1cf Close/reopen issues by keywords in titles and comments (#8866)
* Add close/reopen from comment functionality

* Fix comment

* Rewrite closing/reopening template

* Check xref permissions, move action to services/pull

* Fix RefIsPull field

* Add xref tests

* Fix xref unique filter

* Only highlight keywords for actionable xrefs

* Fix xref neuter filter

* Fix check return status

* Restart CI
2019-11-18 15:13:07 +02:00
guillep2k
08ae6bb7ed Rewrite delivery of issue and comment mails (#9009)
* Mail issue subscribers, rework the function

* Simplify a little more

* Fix unused variable

* Refactor mail delivery to avoid heavy load on server

* Avoid splitting into too many goroutines

* Fix comments and optimize GetMaileableUsersByIDs()

* Fix return on errors
2019-11-18 08:08:20 +00:00
Lunny Xiao
9ff6312627
Move modules/gzip to gitea.com/macaron/gzip (#9058)
* Move modules/gzip to gitea.com/macaron/gzip

* Fix vendor
2019-11-18 13:18:33 +08:00
GiteaBot
ba4e8f221b [skip ci] Updated translations via Crowdin 2019-11-18 01:29:04 +00:00
Vedran
ef513e1af3 Fix double scroll in branch dropdown (#9048)
* Fix double scroll in branch dropdown

* Revert of 425ae38aa9ea3e9a25dee235aa9176762fe4bc5b

* Changes in .less, generated new .css

* Revert unnecessary commented line
2019-11-18 09:25:24 +08:00
silverwind
f8bd90ba60 enable lazy-loading of gitgraph.js (#9036)
- moved gitgraph.js to web_src and made it importable and es6-compatible
- created new webpack chunk for gitgraph
- enabled CSS loader in webpack
- enabled async/await syntax via regenerator-runtime
- added script to ensure webpack chunks are loaded correctly
- disable terser's comment extraction to prevent .LICENCE files

gitgraph.js has many issues:

1. it is incompatible with ES6 because of strict-mode violations
1. it does not export anything
1. it's css has weird styles like for `body`
1. it is not available on npm

I fixed points 1-3 in our version so it's now loadable in webpack. We should eventually consider alternatives.
2019-11-17 23:39:06 +02:00
GiteaBot
06984bbcbf [skip ci] Updated translations via Crowdin 2019-11-17 19:44:07 +00:00
Cherrg
1c911aa825 wiki - add 'write' 'preview' buttons to wiki edit like in issues (#7241)
* Add add 'write' 'preview' buttons to wiki edit like in issues

affects #6975

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* update dark theme

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* fix css lint warnings - missing spaces

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* hide preview button on no fullscreen toolbar

Signed-off-by: Michael Gnehr <michael@gnehr.de>
2019-11-17 14:42:44 -05:00
GiteaBot
9275390423 [skip ci] Updated translations via Crowdin 2019-11-17 14:13:14 +00:00
jaqra
aa178176db Add first issue comment hashtag (#9052) 2019-11-17 16:00:39 +02:00
GiteaBot
8f09aff427 [skip ci] Updated translations via Crowdin 2019-11-17 06:31:35 +00:00
David Svantesson
184e47f6ce Handle setting default branch via API (#9030) 2019-11-17 01:30:00 -05:00
David Svantesson
86cff86b46 Update branch API endpoint to show effective branch protection. (#9031)
* Add API endpoint for displaying effective branch protection.

* Add status checks.
2019-11-16 19:39:18 +00:00
Lars Lehtonen
3dfe9190b0 integrations: fix dropped errors in TestCreateOrUpdateRepoFileForUpdateWithFileMove() (#9040)
integrations: fix dropped error in lfsCommitAndPushTest()
2019-11-16 18:21:39 +00:00
John Olheiser
f4bdcd6e2b Only return JSON for add/remove all (#9028)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-11-16 17:36:13 +00:00
Gary Kim
9feab29405 Check compiled files during build (#9042)
Signed-off-by: Gary Kim <gary@garykim.dev>
2019-11-16 14:15:07 +00:00
Vedran
4f9443cf8e Button tooltip formatting under Branches (#9034)
* Fixes button tooltip formatting under Branches

* Formatting on download button for default branch
2019-11-16 12:03:07 +00:00
Lunny Xiao
1b7182e5ec
Add retry for migration http/https requests (#9019)
* Add retry for migration http/https requests

* give the more suitable name for retry configuraion items

* fix docs and lint

* Only use retryDownloader when setting > 1
2019-11-16 16:30:06 +08:00
Cherrg
6fbfffeeb8 wiki - editor - enable side-by-side button (#7242)
* wiki - enable side-by-side button in editor

and add some delay so side-by-side live preview is updated
* every 10th keypress
* if keypress < 10 -> apter no input for 1 sec

affects #5436


Signed-off-by: Michael Gnehr <michael@gnehr.de>

* decrease timeinterval user need to stop before rendering is triggered

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* removed not needed code with simpleMDE placeholder

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* run highlight.js on markdown preview

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* fix white border around side-by-side preview

Signed-off-by: Michael Gnehr <michael@gnehr.de>
2019-11-16 10:20:07 +08:00
Lunny Xiao
11208f3381
Move git graph from models to modules/graph (#9027) 2019-11-16 08:47:57 +08:00
mrsdizzie
69cfff1541 Update display of reactions to issues and comments (#9038)
Modify display of reactions to issues to remove spaces and make them
feel more apart of the reactions bar rather than separate items within.
2019-11-15 23:47:04 +02:00
Lunny Xiao
e0e4473172 extract some inline functions related with create comment (#8931) 2019-11-15 18:18:09 +00:00
guillep2k
c58fba944d Fix permission checks for close/reopen from commit (#8875)
* Fix checks for close/reopen from commit

* Fix permission order
2019-11-15 15:20:47 +00:00