Commit graph

8536 commits

Author SHA1 Message Date
Mura Li 6e6936d73d Fix nondeterministic behavior (#9341)
The underlying implementation of os.exec uses channels and goroutines.
It is possible to have time-variant error values returned from Cmd.Wait
depending on which comes first.

Also, the git subcommand and options should be separated tokens.

Fixes a flaky test in modules/git/command_test.go
2019-12-13 17:03:38 +08:00
Matthew Bramer 39db99a595 Supports both CMD and PowerShell (#9344)
sc is aliased to Set-Content in PowerShell and these commands will not work without the `.exe` extension.
2019-12-13 00:13:38 -05:00
techknowlogick 6442e003c5
Youtrack now supports Gitea (#9343)
* Youtrack now supports Gitea

* Update third-party-tools.en-us.md
2019-12-12 23:28:54 -05:00
jaqra 27f68bc96f Fix notification page panic (#9337) 2019-12-13 03:08:34 +01:00
Lunny Xiao ba1acf5b50 fix issue indexer not triggered when migrating a repository (#9332) 2019-12-12 23:46:43 +02:00
zeripath dc2fe9801f Make repository management section handle lfs locks (#8726)
* Make repository maangement section handle lfs locks

* Add check attribute handling and handle locking paths better

* More cleanly check-attributes

* handle error

* Check if file exists in default branch before linking to it.

* fixup

* Properly cleanPath

* Use cleanPath

* Sigh
2019-12-12 21:18:07 +08:00
Lunny Xiao 751cfb805d
Fix bug that release attachment files not deleted when deleting repository (#9322)
* Fix bug that release attachment files not deleted when deleting repository

* improve code

* add quote

* improve code
2019-12-12 13:31:05 +08:00
6543 aceb1085c7 [API] extend StopWatch (#9196)
* squash api-stopwatch

* fix prepair logic! + add Tests

* fix lint

* more robust time compare

* delete responce 202 -> 204

* change http responce in test too
2019-12-11 23:23:05 -05:00
John Olheiser 382936a668 Add SyncTags to uploader interface (#9326)
* Add sync tags to interface

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

* Fix revive

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-12-12 08:20:11 +08:00
John Olheiser 3bf5a07537 Only sync tags after all batches (#9319)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-12-11 14:09:06 +08:00
Antoine GIRARD c3d31e5534 refactor(models/attachement): use getAttachmentsByUUIDs (#9317) 2019-12-11 00:01:52 +00:00
Lunny Xiao 50da9f7dae Move modules/indexer to modules/indexer/code (#9301) 2019-12-10 14:29:40 +01:00
zeripath 2c83dac5d4 FCGI: Allow FCGI over unix sockets (#9298)
* FCGI: Allow FCGI over unix sockets

* fixup! FCGI: Allow FCGI over unix sockets
2019-12-10 13:23:26 +01:00
Antoine GIRARD 4dc3993b22 tests: add attachement tests integration (#9309)
* tests: add attachements integration

* Update integrations/attachement_test.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
2019-12-10 19:06:48 +08:00
zeripath d3a9c4ceec
Testing: Update postgres sequences (#9304) 2019-12-10 07:49:05 +00:00
Justin R. Cutler 2d8a89563d Correct port range for cap_net_bind_service (#9306) 2019-12-09 14:20:09 -05:00
6543 7f0d7c0a17 File Edit: Author/Committer interchanged [BugFix] (#9297)
* simple fix

* fix test too

* repair more twists
use same sequence: first Author, then Commiter
2019-12-09 21:11:24 +08:00
techknowlogick c34fdf7e33
prebuild CSS/JS before xgo release binaries (#9293)
* prebuild CSS/JS before xgo release binaries

* Update .drone.yml

* Update Makefile

* update per @lafriks feedback
2019-12-08 17:24:17 -05:00
zeripath baae90e163 Allow incompletely specified Time Formats (#8816)
* Allow incompletely specified time formats

* Adjust error reporting slightly

* Update setting.go
2019-12-08 16:25:00 -05:00
Lunny Xiao be06dee04c Move code indexer related code to a new package (#9191)
* move code indexer related code to a new package

* fix lint

* fix tests

* fix fmt

* GetMaxID support interface parameter
2019-12-08 14:15:35 -05:00
GiteaBot baf089e5b9 [skip ci] Updated translations via Crowdin 2019-12-08 16:59:29 +00:00
silverwind 3f42934b9a Remove explicit 'generate' calls, fix release task (#9288)
* Remove more explicit 'generate' calls

`generate` is now implicit during `build` since #9114, it is no longer
necessary or desired to specify it explicitely.

* add js,css,generate dependencies to release task

* remove generate warning as per @lunny
2019-12-08 18:56:59 +02:00
zeripath 95a57394af Log: Ensure FLAGS=none is -1 (#9287) 2019-12-07 23:36:47 -05:00
GiteaBot 15254f5762 [skip ci] Updated translations via Crowdin 2019-12-08 02:53:56 +00:00
techknowlogick cbf18f61d1
Update Owners for upcoming year (#9290)
Close #9230
2019-12-07 21:51:55 -05:00
zeripath 3da6d256f4
Missed defer prepareTestEnv (#9285)
* onGiteaRun should defer the cleanup from prepareTestEnv

* Some more missed defers
2019-12-08 01:14:50 +00:00
6543 37e10d4543 [API] Add Reactions (#9220)
* reject reactions wich ar not allowed

* dont duble check CreateReaction now throw ErrForbiddenIssueReaction

* add /repos/{owner}/{repo}/issues/comments/{id}/reactions endpoint

* add Find Functions

* fix some swagger stuff + add issue reaction endpoints + GET ReactionList now use FindReactions...

* explicite Issue Only Reaction for FindReactionsOptions with "-1" commentID

* load issue; load user ...

* return error again

* swagger def canged after LINT

* check if user has ben loaded

* add Tests

* better way of comparing results

* add suggestion

* use different issue for test
(dont interfear with integration test)

* test dont compare Location on timeCompare

* TEST: add forbidden dubble add

* add comments in code to explain

* add settings.UI.ReactionsMap
so if !setting.UI.ReactionsMap[opts.Type] works
2019-12-07 17:04:19 -05:00
Alexander Scheel ee7df7ba8c Markdown: Sanitizier Configuration (#9075)
* Support custom sanitization policy

Allowing the gitea administrator to configure sanitization policy allows
them to couple external renders and custom templates to support more
markup. In particular, the `pandoc` renderer allows generating KaTeX
annotations, wrapping them in `<span>` elements with class `math` and
either `inline` or `display` (depending on whether or not inline or
block mode was requested).

This iteration gives the administrator whitelisting powers; carefully
crafted regexes will thus let through only the desired attributes
necessary to support their custom markup.

Resolves: #9054

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>

* Document new sanitization configuration

 - Adds basic documentation to app.ini.sample,
 - Adds an example to the Configuration Cheat Sheet, and
 - Adds extended information to External Renderers section.

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>

* Drop extraneous length check in newMarkupSanitizer(...)

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>

* Fix plural ELEMENT and ALLOW_ATTR in docs

These were left over from their initial names. Make them singular to
conform with the current expectations.

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>
2019-12-07 14:49:04 -05:00
Benno cecc31951c fix #9198 make diff detail sticky again (#9280) 2019-12-07 13:01:57 -05:00
GiteaBot 0e56337f64 [skip ci] Updated translations via Crowdin 2019-12-07 15:54:45 +00:00
Lunny Xiao ef98b168f7
Move UpdateIssuesCommit from models to repofiles (#9276) 2019-12-07 23:52:36 +08:00
David Svantesson 9cb418e623 Redirect issue if repo has configured external tracker. (#9247)
* Redirect issue if repo has configured external tracker.

* Handle error

* Add tests for redirect

* Fix test consistency
2019-12-06 23:21:18 -05:00
Lunny Xiao 82e0383d21 Move some pull request functions from models to services (#9266)
* Move some pull request functions from models to services

* Fix test
2019-12-06 21:44:10 -05:00
Oscar Costa 1583c48e3a Show label list on label set (#9251)
* Showing the list of labels of template files #7812

* Returning and logging errors when loading labels

* Commenting public method

* Change log level in case of error loading labels.
2019-12-06 21:13:19 -05:00
GiteaBot eba816e826 [skip ci] Updated translations via Crowdin 2019-12-06 19:16:21 +00:00
6543 0a9abcb84c docs change gitea version to 1.10.1 (#9270) 2019-12-06 14:12:38 -05:00
silverwind d672206800 Update JS dependencies (#9255)
This is the result of `make npm-update`. I also fixed a minor linting
issue which came up with the eslint 6.7 update.
2019-12-06 14:41:25 +08:00
Lunny Xiao e3081c667a
Only show part of members on orgnization dashboard and add paging for orgnization members page (#9092)
* Only show part of members on orgnization dashboard and add paging for orgnization members page

* fix test

* fix typo
2019-12-06 13:34:54 +08:00
Lunny Xiao 77730db257
Move repoWorkPool outside rename/transfer repository (#9086)
* Move repoWorkPool outside rename/transfer repository

* fix import

* Fix test
2019-12-06 12:00:50 +08:00
silverwind 9ff5b75559 Switch CSS minifier to cssnano (#9260)
This results in around 4kB saving in CSS size and also resolves with a
particular issue on git bash which had issues with the format of the
lessc arguments.
2019-12-05 19:33:06 -05:00
John Olheiser d7c52b8dce Changelog 1.10.1 (#9256) (#9262)
* Changelog for 1.10.1

* format ...

* format

* add @techknowlogick s suggestion
2019-12-06 00:15:11 +02:00
silverwind 1718a9591c Ensure LF on checkouts and in editors (#9259)
This will ensure our repo is always checked out with LF line endings
which should help Windows users who have line ending normalization
enabled.

Additionally, added the LF preference to .editorconfig.
2019-12-05 23:09:01 +02:00
GiteaBot 43f7b97c4a [skip ci] Updated translations via Crowdin 2019-12-05 17:21:04 +00:00
Lunny Xiao 48be1889cd Fix latest docker image haven't include static files. (#9252)
* add warnging on docs

* fix docs
2019-12-05 12:18:28 -05:00
silverwind d9c67a8c90 Add Node.js build dep, remove built js/css files (#9114)
- Added Node.js as build dependency and removes build files from git.
- Added version checks for both Go and Node.js.
- Overhauled the js/css make target to only run when needed.
- Merged the `generate` make target into `build` as per suggestion.

Fixes: https://github.com/go-gitea/gitea/issues/6782
Fixes: https://github.com/go-gitea/gitea/issues/9216
2019-12-05 11:41:38 +08:00
Alexey 〒erentyev e80fe201c0 Fixed topics margin (#9248)
Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
2019-12-03 23:10:40 -05:00
GiteaBot 7ccaf54140 [skip ci] Updated translations via Crowdin 2019-12-04 01:42:09 +00:00
jaqra 8875586570 Change some label colors (#9051)
* Change label colors

* Override black basic label background for green theme on label list
2019-12-03 20:39:58 -05:00
David Svantesson bac4b78e09 Branch protection: Possibility to not use whitelist but allow anyone with write access (#9055)
* Possibility to not use whitelist but allow anyone with write access

* fix existing test

* rename migration function

* Try to give a better name for migration step

* Clear settings if higher level setting is not set

* Move official reviews to db instead of counting approvals each time

* migration

* fix

* fix migration

* fix migration

* Remove NOT NULL from EnableWhitelist as migration isn't possible

* Fix migration, reviews are connected to issues.

* Fix SQL query issues in GetReviewersByPullID.

* Simplify function GetReviewersByIssueID

* Handle reviewers that has been deleted

* Ensure reviews for test is in a well defined order

* Only clear and set official reviews when it is an approve or reject.
2019-12-03 20:08:56 -05:00
David Svantesson 6460284085 Add comment to exported function WindowsServiceName (make revive) (#9241) 2019-12-03 19:16:29 -05:00