]> source.dussan.org Git - gitea.git/log
gitea.git
4 years agoMove some repository methods from models to modules/repository (#9353)
Lunny Xiao [Sat, 14 Dec 2019 17:30:01 +0000 (01:30 +0800)]
Move some repository methods from models to modules/repository (#9353)

* Move some repository methods from models to modules/repository

* fix test

4 years agoDefaultBranch needs to be prefixed by BranchPrefix (#9356)
zeripath [Sat, 14 Dec 2019 13:29:41 +0000 (13:29 +0000)]
DefaultBranch needs to be prefixed by BranchPrefix (#9356)

4 years agosite admin could view org's members (#9346)
Lunny Xiao [Sat, 14 Dec 2019 06:36:59 +0000 (14:36 +0800)]
site admin could view org's members (#9346)

4 years agoDefault NO_REPLY_ADDRESS to DOMAIN (#9325)
zeripath [Sat, 14 Dec 2019 04:14:43 +0000 (04:14 +0000)]
Default NO_REPLY_ADDRESS to DOMAIN (#9325)

* Default NO_REPLY_ADDRESS to DOMAIN

The default NO_REPLY_ADDRESS was previously noreply.example.org
This PR changes this to default to the default DOMAIN for gitea.

* Change default to noreply.%(DOMAIN)s

* Change default to "noreply" + Domain

4 years agoRemove release attachments which repository has been deleted (#9334)
Lunny Xiao [Sat, 14 Dec 2019 03:30:39 +0000 (11:30 +0800)]
Remove release attachments which repository has been deleted (#9334)

4 years agoFix PR/issue redirects when having external tracker (#9339)
David Svantesson [Sat, 14 Dec 2019 00:53:32 +0000 (01:53 +0100)]
Fix PR/issue redirects when having external tracker (#9339)

* Make sure only issues are redirected to external tracker

* Ensure correct redirects for pulls after dependency or watch.

* NewIssuePost is always issues so no need to redirect with type.

4 years agodeps: update and fix chardet import (#9351)
Antoine GIRARD [Sat, 14 Dec 2019 00:15:48 +0000 (01:15 +0100)]
deps: update and fix chardet import (#9351)

4 years agoRemove SavePatch and generate patches on the fly (#9302)
zeripath [Fri, 13 Dec 2019 22:21:06 +0000 (22:21 +0000)]
Remove SavePatch and generate patches on the fly (#9302)

* Save patches to temporary files

* Remove SavePatch and generate patches on the fly

* Use ioutil.TempDir

* fixup! Use ioutil.TempDir

* fixup! fixup! Use ioutil.TempDir

* RemoveAll LocalCopyPath() in initIntergrationTest

* Default to status checking on PR creation

* Remove unnecessary set to StatusChecking

* Protect against unable to load repo

* Handle conflicts

* Restore original conflict setting

* In TestPullRequests update status to StatusChecking before running TestPatch

4 years agoUpdate _headers (#9349)
John Olheiser [Fri, 13 Dec 2019 20:03:09 +0000 (14:03 -0600)]
Update _headers (#9349)

4 years agoFix protected branch using IssueID (#9348)
John Olheiser [Fri, 13 Dec 2019 15:37:10 +0000 (09:37 -0600)]
Fix protected branch using IssueID (#9348)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoFix nondeterministic behavior (#9341)
Mura Li [Fri, 13 Dec 2019 09:03:38 +0000 (17:03 +0800)]
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

4 years agoSupports both CMD and PowerShell (#9344)
Matthew Bramer [Fri, 13 Dec 2019 05:13:38 +0000 (00:13 -0500)]
Supports both CMD and PowerShell (#9344)

sc is aliased to Set-Content in PowerShell and these commands will not work without the `.exe` extension.

4 years agoYoutrack now supports Gitea (#9343)
techknowlogick [Fri, 13 Dec 2019 04:28:54 +0000 (23:28 -0500)]
Youtrack now supports Gitea (#9343)

* Youtrack now supports Gitea

* Update third-party-tools.en-us.md

4 years agoFix notification page panic (#9337)
jaqra [Fri, 13 Dec 2019 02:08:34 +0000 (05:08 +0300)]
Fix notification page panic (#9337)

4 years agofix issue indexer not triggered when migrating a repository (#9332)
Lunny Xiao [Thu, 12 Dec 2019 21:46:43 +0000 (05:46 +0800)]
fix issue indexer not triggered when migrating a repository (#9332)

4 years agoMake repository management section handle lfs locks (#8726)
zeripath [Thu, 12 Dec 2019 13:18:07 +0000 (13:18 +0000)]
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

4 years agoFix bug that release attachment files not deleted when deleting repository (#9322)
Lunny Xiao [Thu, 12 Dec 2019 05:31:05 +0000 (13:31 +0800)]
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

4 years ago[API] extend StopWatch (#9196)
6543 [Thu, 12 Dec 2019 04:23:05 +0000 (05:23 +0100)]
[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

4 years agoAdd SyncTags to uploader interface (#9326)
John Olheiser [Thu, 12 Dec 2019 00:20:11 +0000 (18:20 -0600)]
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>
4 years agoOnly sync tags after all batches (#9319)
John Olheiser [Wed, 11 Dec 2019 06:09:06 +0000 (00:09 -0600)]
Only sync tags after all batches (#9319)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agorefactor(models/attachement): use getAttachmentsByUUIDs (#9317)
Antoine GIRARD [Wed, 11 Dec 2019 00:01:52 +0000 (01:01 +0100)]
refactor(models/attachement): use getAttachmentsByUUIDs (#9317)

4 years agoMove modules/indexer to modules/indexer/code (#9301)
Lunny Xiao [Tue, 10 Dec 2019 13:29:40 +0000 (21:29 +0800)]
Move modules/indexer to modules/indexer/code (#9301)

4 years agoFCGI: Allow FCGI over unix sockets (#9298)
zeripath [Tue, 10 Dec 2019 12:23:26 +0000 (12:23 +0000)]
FCGI: Allow FCGI over unix sockets (#9298)

* FCGI: Allow FCGI over unix sockets

* fixup! FCGI: Allow FCGI over unix sockets

4 years agotests: add attachement tests integration (#9309)
Antoine GIRARD [Tue, 10 Dec 2019 11:06:48 +0000 (12:06 +0100)]
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>
4 years agoTesting: Update postgres sequences (#9304)
zeripath [Tue, 10 Dec 2019 07:49:05 +0000 (07:49 +0000)]
Testing: Update postgres sequences (#9304)

4 years agoCorrect port range for cap_net_bind_service (#9306)
Justin R. Cutler [Mon, 9 Dec 2019 19:20:09 +0000 (14:20 -0500)]
Correct port range for cap_net_bind_service (#9306)

4 years agoFile Edit: Author/Committer interchanged [BugFix] (#9297)
6543 [Mon, 9 Dec 2019 13:11:24 +0000 (14:11 +0100)]
File Edit: Author/Committer interchanged [BugFix] (#9297)

* simple fix

* fix test too

* repair more twists
use same sequence: first Author, then Commiter

4 years agoprebuild CSS/JS before xgo release binaries (#9293)
techknowlogick [Sun, 8 Dec 2019 22:24:17 +0000 (17:24 -0500)]
prebuild CSS/JS before xgo release binaries (#9293)

* prebuild CSS/JS before xgo release binaries

* Update .drone.yml

* Update Makefile

* update per @lafriks feedback

4 years agoAllow incompletely specified Time Formats (#8816)
zeripath [Sun, 8 Dec 2019 21:25:00 +0000 (21:25 +0000)]
Allow incompletely specified Time Formats (#8816)

* Allow incompletely specified time formats

* Adjust error reporting slightly

* Update setting.go

4 years agoMove code indexer related code to a new package (#9191)
Lunny Xiao [Sun, 8 Dec 2019 19:15:35 +0000 (03:15 +0800)]
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

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 8 Dec 2019 16:59:29 +0000 (16:59 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoRemove explicit 'generate' calls, fix release task (#9288)
silverwind [Sun, 8 Dec 2019 16:56:59 +0000 (17:56 +0100)]
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

4 years agoLog: Ensure FLAGS=none is -1 (#9287)
zeripath [Sun, 8 Dec 2019 04:36:47 +0000 (04:36 +0000)]
Log: Ensure FLAGS=none is -1 (#9287)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 8 Dec 2019 02:53:56 +0000 (02:53 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoUpdate Owners for upcoming year (#9290)
techknowlogick [Sun, 8 Dec 2019 02:51:55 +0000 (21:51 -0500)]
Update Owners for upcoming year (#9290)

Close #9230

4 years agoMissed defer prepareTestEnv (#9285)
zeripath [Sun, 8 Dec 2019 01:14:50 +0000 (01:14 +0000)]
Missed defer prepareTestEnv (#9285)

* onGiteaRun should defer the cleanup from prepareTestEnv

* Some more missed defers

4 years ago[API] Add Reactions (#9220)
6543 [Sat, 7 Dec 2019 22:04:19 +0000 (23:04 +0100)]
[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

4 years agoMarkdown: Sanitizier Configuration (#9075)
Alexander Scheel [Sat, 7 Dec 2019 19:49:04 +0000 (14:49 -0500)]
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>
4 years agofix #9198 make diff detail sticky again (#9280)
Benno [Sat, 7 Dec 2019 18:01:57 +0000 (02:01 +0800)]
fix #9198 make diff detail sticky again (#9280)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 7 Dec 2019 15:54:45 +0000 (15:54 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoMove UpdateIssuesCommit from models to repofiles (#9276)
Lunny Xiao [Sat, 7 Dec 2019 15:52:36 +0000 (23:52 +0800)]
Move UpdateIssuesCommit from models to repofiles (#9276)

4 years agoRedirect issue if repo has configured external tracker. (#9247)
David Svantesson [Sat, 7 Dec 2019 04:21:18 +0000 (05:21 +0100)]
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

4 years agoMove some pull request functions from models to services (#9266)
Lunny Xiao [Sat, 7 Dec 2019 02:44:10 +0000 (10:44 +0800)]
Move some pull request functions from models to services (#9266)

* Move some pull request functions from models to services

* Fix test

4 years agoShow label list on label set (#9251)
Oscar Costa [Sat, 7 Dec 2019 02:13:19 +0000 (18:13 -0800)]
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.

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 6 Dec 2019 19:16:21 +0000 (19:16 +0000)]
[skip ci] Updated translations via Crowdin

4 years agodocs change gitea version to 1.10.1 (#9270)
6543 [Fri, 6 Dec 2019 19:12:38 +0000 (20:12 +0100)]
docs change gitea version to 1.10.1 (#9270)

4 years agoUpdate JS dependencies (#9255)
silverwind [Fri, 6 Dec 2019 06:41:25 +0000 (07:41 +0100)]
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.

4 years agoOnly show part of members on orgnization dashboard and add paging for orgnization...
Lunny Xiao [Fri, 6 Dec 2019 05:34:54 +0000 (13:34 +0800)]
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

4 years agoMove repoWorkPool outside rename/transfer repository (#9086)
Lunny Xiao [Fri, 6 Dec 2019 04:00:50 +0000 (12:00 +0800)]
Move repoWorkPool outside rename/transfer repository (#9086)

* Move repoWorkPool outside rename/transfer repository

* fix import

* Fix test

4 years agoSwitch CSS minifier to cssnano (#9260)
silverwind [Fri, 6 Dec 2019 00:33:06 +0000 (01:33 +0100)]
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.

4 years agoChangelog 1.10.1 (#9256) (#9262)
John Olheiser [Thu, 5 Dec 2019 22:15:12 +0000 (16:15 -0600)]
Changelog 1.10.1 (#9256) (#9262)

* Changelog for 1.10.1

* format ...

* format

* add @techknowlogick s suggestion

4 years agoEnsure LF on checkouts and in editors (#9259)
silverwind [Thu, 5 Dec 2019 21:09:01 +0000 (22:09 +0100)]
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.

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 5 Dec 2019 17:21:04 +0000 (17:21 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix latest docker image haven't include static files. (#9252)
Lunny Xiao [Thu, 5 Dec 2019 17:18:28 +0000 (01:18 +0800)]
Fix latest docker image haven't include static files. (#9252)

* add warnging on docs

* fix docs

4 years agoAdd Node.js build dep, remove built js/css files (#9114)
silverwind [Thu, 5 Dec 2019 03:41:38 +0000 (04:41 +0100)]
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
4 years agoFixed topics margin (#9248)
Alexey 〒erentyev [Wed, 4 Dec 2019 04:10:40 +0000 (07:10 +0300)]
Fixed topics margin (#9248)

Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 4 Dec 2019 01:42:09 +0000 (01:42 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoChange some label colors (#9051)
jaqra [Wed, 4 Dec 2019 01:39:58 +0000 (04:39 +0300)]
Change some label colors (#9051)

* Change label colors

* Override black basic label background for green theme on label list

4 years agoBranch protection: Possibility to not use whitelist but allow anyone with write acces...
David Svantesson [Wed, 4 Dec 2019 01:08:56 +0000 (02:08 +0100)]
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.

4 years agoAdd comment to exported function WindowsServiceName (make revive) (#9241)
David Svantesson [Wed, 4 Dec 2019 00:16:29 +0000 (01:16 +0100)]
Add comment to exported function WindowsServiceName (make revive) (#9241)

4 years agoAllow kbd tags (#9245)
John Olheiser [Tue, 3 Dec 2019 19:02:41 +0000 (13:02 -0600)]
Allow kbd tags (#9245)

* Allow kbd tags

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoDon't link wiki revision to commit (#9244)
mrsdizzie [Tue, 3 Dec 2019 18:15:41 +0000 (13:15 -0500)]
Don't link wiki revision to commit (#9244)

In #7907 a change was made to use the same template for repo and wiki
commit lists. However, there is no code or logic for showing the diff of
a wiki commit so it just produces broken links like:

 http://localhost:3000/mrsdizzie/%!s(%3Cnil%3E)/commit/5e72eeb00896d3853ab22a01950a50119b249567

This just removes the link for now until that feature is implemented

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 3 Dec 2019 13:08:09 +0000 (13:08 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoAdd myself to maintainers (#9240)
David Svantesson [Tue, 3 Dec 2019 13:05:23 +0000 (14:05 +0100)]
Add myself to maintainers (#9240)

4 years agoFix Dashboard Issues/PR list (#9235)
6543 [Tue, 3 Dec 2019 07:26:02 +0000 (08:26 +0100)]
Fix Dashboard Issues/PR list (#9235)

* fix it

* revert suggestion part

4 years agoFix active issue (#9238)
John Olheiser [Tue, 3 Dec 2019 06:01:29 +0000 (00:01 -0600)]
Fix active issue (#9238)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoRemove empty lines (#9232)
John Olheiser [Tue, 3 Dec 2019 00:33:25 +0000 (18:33 -0600)]
Remove empty lines (#9232)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoFix context menu overflow & review tag margin (#9231)
John Olheiser [Mon, 2 Dec 2019 23:03:30 +0000 (17:03 -0600)]
Fix context menu overflow & review tag margin (#9231)

* Fix context menu overflow

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add review tag CSS

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 2 Dec 2019 18:35:05 +0000 (18:35 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoChange review content column to type text in db (#9229)
David Svantesson [Mon, 2 Dec 2019 18:32:40 +0000 (19:32 +0100)]
Change review content column to type text in db (#9229)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 2 Dec 2019 14:45:50 +0000 (14:45 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoRemove unused comment actions (#9222)
Lunny Xiao [Mon, 2 Dec 2019 14:43:39 +0000 (22:43 +0800)]
Remove unused comment actions (#9222)

* Remove unused comment actions

* improve code

4 years agoFixed topic regex pattern and added search by topic links after save (#9219)
Alexey 〒erentyev [Mon, 2 Dec 2019 09:13:19 +0000 (12:13 +0300)]
Fixed topic regex pattern and added search by topic links after save (#9219)

Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
4 years ago[UI] IssuePage multi repo select (#8741)
6543 [Mon, 2 Dec 2019 03:50:36 +0000 (04:50 +0100)]
[UI] IssuePage multi repo select (#8741)

* Make repository list @ issues/PR page persist

Will partially fix #6355

* Enable multiple selections in repo list @ issues/PR page

Part of issue #6355

* Add RepoIDs to UserIssueStatsOptions to make "type" count correct when selecting one/multiple repos.
* Replace variable "repo" with list "repos[]" and enable multiple selections of repositories from list by including/excluding RepoIDs in list.
*

* Remove redundant code

* Add 'All' button

Improves functionality of the page, so that backtracking is not necessary to reset the page

* Remove redundant variable

Completely replace 'RepoID' with 'RepoIDs' and remove redundant code

* Add RepoIDs to label link

* Revert part of code to previous version to troubleshoot build failure

* Implement old and new pieces of code whilst adhering to multi select

* Attempt to join the two versions

Last commit passed tests but doesn't work in practice, this works in practice and hopefully passes the tests.

* Update tests to desired state

* Fix pagination implementation and tests

* Pass repoIDs as `repos=[1,2,3...]` instead of several `repos[]=..`
* Update tests file to reflect new functionality
* Update template with new `repos` format
* Implement new solution to show constant "total issues" count for "All" button

* Correct behavior when passing zero to array

* Comment out test url returning 404

This keeps returning 404 in the test despite working in practice, for the sake of running more tests I am commenting it out

* Comment out another test url returning 404

Last attempt, if more tests crash I will uncomment the urls and request assistance.

* Reenable tests and test fix

* Re-enable tests
* Make selecting "In your repositories" reset selection as passing IDs of repos belonging to other profiles causes breakage
* Remove unnecessary (with multi-selection enable) code

* Drop repo from repo map and total count if permission denied

* Remove extra parenthesis

* make template work again

* find bug!

* forgot the '#' at bugfixing

* delete unused RepoID

* compile regex only one time

* make fmt

* local variable = capital letter lower

* check if repos query pattern is correct

* pagination remove last , - make regex work again

* use Replace instead of ReplaceAll; del delete

* fix test

* how did this test binary got in?!?
dont forgot the "-p" at git add * !

* dont replace -> cut fisrt & last string

Co-Authored-By: zeripath <art27@cantab.net>
* jet another regex

dont mind as long as it has the same result and is performatn ...

Co-Authored-By: zeripath <art27@cantab.net>
* dont use nonexisting repo for test

* exclude /issues?type=created_by from test

* add table to querys
use same syntax in each query (table.colum)

* add new issue for test

* dont make a workaround or something else
this need a refactor itself and is out of scope for this PR

* fix misspell

* CI.redo()

* englisch txt update

Co-Authored-By: zeripath <art27@cantab.net>
* add sugestions

* Tweak & Fix

* CI.restart()

4 years ago[Feature] Custom Reactions (#8886)
6543 [Sun, 1 Dec 2019 22:57:24 +0000 (23:57 +0100)]
[Feature] Custom Reactions (#8886)

* add [ui] Reactions

* move contend check from form to go functions

* use else if

* check if reaction is allowed only on react
(so previous custom reaction can be still removed)

* use $.AllowedReactions in templates

* use ctx.Flash.Error

* use it there too

* add redirection

* back to server error
because a wrong reaction is a template issue ...

* add emoji list link

* add docs entry

* small wording nit
suggestions from @jolheiser - thx

* same reactions as github

* fix PR reactions

* handle error so template JS could check

* Add Integrations Test

* add REACTIONS setting to cheat-sheet doc page

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 1 Dec 2019 13:59:18 +0000 (13:59 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoAlternate syntax for cross references (#9116)
guillep2k [Sun, 1 Dec 2019 13:57:05 +0000 (10:57 -0300)]
Alternate syntax for cross references (#9116)

* Add support for local vs. remote xrefs

* Add doc for references

* Docs: fix cases not currently supported

* One more doc fix

* Doc: mentions for teams and orgs

* Change !num ref concept, no change in functionality

* Fix test

* Improve table of issue reference types

* Fix paragraph mark

4 years agoExtract createComment (#9125)
Lunny Xiao [Sun, 1 Dec 2019 02:44:39 +0000 (10:44 +0800)]
Extract createComment (#9125)

* Extract createComment

* fix lint

* fix lint

4 years agoAdd release_counter to Repo API (#9214)
6543 [Sat, 30 Nov 2019 19:28:47 +0000 (20:28 +0100)]
Add release_counter to Repo API (#9214)

4 years ago[Bug] [API] Add language to user api (#9215)
6543 [Sat, 30 Nov 2019 16:18:40 +0000 (17:18 +0100)]
[Bug] [API] Add language to user api (#9215)

* add language to user api

* OK

Co-Authored-By: Lauris BH <lauris@nix.lv>
4 years agoGraceful: Cancel Process on monitor pages & HammerTime (#9213)
zeripath [Sat, 30 Nov 2019 14:40:22 +0000 (08:40 -0600)]
Graceful: Cancel Process on monitor pages & HammerTime (#9213)

* Graceful: Create callbacks to with contexts

* Graceful: Say when Gitea is completely finished

* Graceful: Git and Process within HammerTime

Force all git commands to terminate at HammerTime
Force all process commands to terminate at HammerTime
Move almost all git processes to run as git Commands

* Graceful: Always Hammer after Shutdown

* ProcessManager: Add cancel functionality

* Fix tests

* Make sure that process.Manager.Kill() cancels

* Make threadsafe access to Processes and remove own unused Kill

* Remove cmd from the process manager as it is no longer used

* the default context is the correct context

* get rid of double till

4 years agoMake consistent links to repository in the Slack/Mattermost notificiations (#9205)
Lauris BH [Sat, 30 Nov 2019 10:23:37 +0000 (12:23 +0200)]
Make consistent links to repository in the Slack/Mattermost notificiations (#9205)

4 years agoVariable expansion in repository templates (#9163)
John Olheiser [Sat, 30 Nov 2019 06:54:47 +0000 (00:54 -0600)]
Variable expansion in repository templates (#9163)

* Start expansion

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* _template rather than .template

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add descriptions to mapping

* Start globbing

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Re-arrange imports

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Don't expand git hooks

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add glob tests for .giteatemplate

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Parse globs separately so they can be tested more easily

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Change template location and add docs

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Update docs/content/doc/features/gitea-directory.md

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Update docs/content/doc/features/gitea-directory.md

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Add upper-lower case match

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Update models/repo_generate.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoCorrect tooltip msg blocked by dependencies (#9211)
programkode [Fri, 29 Nov 2019 19:05:49 +0000 (20:05 +0100)]
Correct tooltip msg blocked by dependencies (#9211)

4 years agoexpose PR counter on Repo API (#9202)
6543 [Fri, 29 Nov 2019 15:14:24 +0000 (16:14 +0100)]
expose PR counter on Repo API (#9202)

4 years agoMove PushUpdateOptions from models to repofiles (#9124)
Lunny Xiao [Fri, 29 Nov 2019 02:21:05 +0000 (10:21 +0800)]
Move PushUpdateOptions from models to repofiles (#9124)

4 years agoProperly fix displaying virtual session provider in admin panel (#9137)
zeripath [Thu, 28 Nov 2019 17:35:41 +0000 (17:35 +0000)]
Properly fix displaying virtual session provider in admin panel (#9137)

* Properly fix #7127

Although #7300 properly shadows the password from the virtual session
provider, the template displaying the provider config still presumed
that the config was JSON.

This PR updates the template and properly hides the Virtual Session
provider.

Fixes #7127

* update per @silverwind's suggestion

4 years agoupgrade levelqueue to 0.1.0 (#9192)
Lunny Xiao [Thu, 28 Nov 2019 15:37:33 +0000 (23:37 +0800)]
upgrade levelqueue to 0.1.0 (#9192)

4 years agoFix panic when diff (#9187)
Lunny Xiao [Thu, 28 Nov 2019 09:05:57 +0000 (17:05 +0800)]
Fix panic when diff (#9187)

* fix panic when diff

* improve code

4 years agodocker: ask s6 to stop all service when gitea stop (#9171)
Antoine GIRARD [Wed, 27 Nov 2019 18:08:57 +0000 (19:08 +0100)]
docker: ask s6 to stop all service when gitea stop (#9171)

* fix: ask s6 to stop all service when gitea stop

https://github.com/just-containers/s6-overlay#writing-an-optional-finish-script

* change service folder

4 years agoUpgrade blevesearch to v0.8.1 (#9177)
Mura Li [Wed, 27 Nov 2019 09:23:33 +0000 (17:23 +0800)]
Upgrade blevesearch to v0.8.1 (#9177)

For #1441

https://github.com/blevesearch/bleve/commit/a91b427b59b893f112021841ba7370d285f8426f

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 27 Nov 2019 00:53:49 +0000 (00:53 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix datarace on git.GlobalCommandArgs on tests (#9162)
Lunny Xiao [Wed, 27 Nov 2019 00:35:52 +0000 (08:35 +0800)]
Fix datarace on git.GlobalCommandArgs on tests (#9162)

* fix datarace on git.GlobalCommandArgs on tests

* fix tests

* fix tests

* fix tests

4 years agoYet another attempt to fix the intermittent failure of gpg git test (#9146)
zeripath [Tue, 26 Nov 2019 15:35:41 +0000 (15:35 +0000)]
Yet another attempt to fix the intermittent failure of gpg git test (#9146)

* Yet another attempt to fix the race in gpg_git_test

* add some fail nows

* Need to set preparetestenv

* Ensure that http messages go to the correct server

4 years agoFix "data race" in testlogger (#9159)
zeripath [Mon, 25 Nov 2019 23:21:37 +0000 (23:21 +0000)]
Fix "data race" in testlogger (#9159)

* Fix data race in testlogger

* Update git_helper_for_declarative_test.go

4 years agoFix #9151 - smtp logger configuration sendTos should be an array (#9154)
zeripath [Mon, 25 Nov 2019 13:38:57 +0000 (13:38 +0000)]
Fix #9151 - smtp logger configuration sendTos should be an array (#9154)

* Fix #9151 - sendTos should be an array

* trimspace from the addresses

4 years agoAdd comment highlight when target from url (#9047)
jaqra [Mon, 25 Nov 2019 11:50:46 +0000 (14:50 +0300)]
Add comment highlight when target from url (#9047)

* Add comment highlight css

* Add js to remove highlight on click outside

* Improve refresh page on click outside

* Use location.hash property to remove target

* Handle click ONLY clicked outside of 'targetted comment' (not other comment)

* Remove unnecessary checks and simply code

* Combine hash and setState to remove target path

4 years agoAdd avatar and issue labels to template repositories (#9149)
John Olheiser [Mon, 25 Nov 2019 05:17:51 +0000 (23:17 -0600)]
Add avatar and issue labels to template repositories (#9149)

* Add avatar and issue labels

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoFix max length check and limit in multiple repo forms (#9148)
Lauris BH [Sun, 24 Nov 2019 23:06:23 +0000 (01:06 +0200)]
Fix max length check and limit in multiple repo forms (#9148)

* Fix input field max length for release, label and milestone forms

* Add max length for isseu and PR title

4 years agoupdate #9066 Always show Password field on link account sign in page (#9147)
Benno [Sun, 24 Nov 2019 20:17:53 +0000 (04:17 +0800)]
update #9066 Always show Password field on link account sign in page (#9147)