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

4 years agoFix what information is shown about user in API. (#9115)
David Svantesson [Sun, 24 Nov 2019 19:45:58 +0000 (20:45 +0100)]
Fix what information is shown about user in API. (#9115)

* Fix what information is shown about user in API.

* Use Email directly, as KeepEmailPrivate is already handled.

4 years agoAdd git hooks and webhooks to template repositories; move to services (#8926)
John Olheiser [Sun, 24 Nov 2019 17:57:52 +0000 (11:57 -0600)]
Add git hooks and webhooks to template repositories; move to services (#8926)

* Add git hooks and webhooks to template options

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

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Add tooltip if the user can't edit git hooks

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Close repositories after copying git hooks

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

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Restructure for services

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Move GenerateRepository to using a DBContext

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Wrap with models.WithTx

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Remove debug print

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Move if-error-delete-repo outside WithTx

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Return nil if no repo generated

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoFix team links in HTML rendering (#9127)
guillep2k [Sun, 24 Nov 2019 16:34:44 +0000 (13:34 -0300)]
Fix team links in HTML rendering (#9127)

* Fix team links in HTML rendering

* Fix check and lint

4 years agoGraceful: Allow graceful restart for fcgi (#9112)
zeripath [Sun, 24 Nov 2019 10:39:50 +0000 (10:39 +0000)]
Graceful: Allow graceful restart for fcgi (#9112)

* Graceful: Allow graceful restart for fcgi

My previous interpretation was incorrect - we do not handle sockets
being passed in over stdin

* Update web.go

4 years agoFix show single review comments in the PR page (#9143)
guillep2k [Sun, 24 Nov 2019 05:46:16 +0000 (02:46 -0300)]
Fix show single review comments in the PR page (#9143)

4 years agoMove mirror sync actions to notification (#9022)
Lunny Xiao [Sun, 24 Nov 2019 05:16:59 +0000 (13:16 +0800)]
Move mirror sync actions to notification (#9022)

* Move mirror sync actions to notification

* fix lint

4 years agoGraceful: Allow graceful restart for unix sockets (#9113)
zeripath [Sun, 24 Nov 2019 02:11:24 +0000 (02:11 +0000)]
Graceful: Allow graceful restart for unix sockets (#9113)

Previously we could not handle graceful restarts for http over unix
sockets. These can now be handled.

4 years agofix add comment button text align (#9140)
Benno [Sat, 23 Nov 2019 23:07:15 +0000 (07:07 +0800)]
fix add comment button text align (#9140)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 23 Nov 2019 15:05:14 +0000 (15:05 +0000)]
[skip ci] Updated translations via Crowdin

4 years agofix race on indexer (#9136)
Lunny Xiao [Sat, 23 Nov 2019 15:03:35 +0000 (23:03 +0800)]
fix race on indexer (#9136)

4 years agoAdd single sign-on support via SSPI on Windows (#8463)
QuaSoft [Fri, 22 Nov 2019 23:33:31 +0000 (01:33 +0200)]
Add single sign-on support via SSPI on Windows (#8463)

* Add single sign-on support via SSPI on Windows

* Ensure plugins implement interface

* Ensure plugins implement interface

* Move functions used only by the SSPI auth method to sspi_windows.go

* Field SSPISeparatorReplacement of AuthenticationForm should not be required via binding, as binding will insist the field is non-empty even if another login type is selected

* Fix breaking of oauth authentication on download links. Do not create new session with SSPI authentication on download links.

* Update documentation for the new 'SPNEGO with SSPI' login source

* Mention in documentation that ROOT_URL should contain the FQDN of the server

* Make sure that Contexter is not checking for active login sources when the ORM engine is not initialized (eg. when installing)

* Always initialize and free SSO methods, even if they are not enabled, as a method can be activated while the app is running (from Authentication sources)

* Add option in SSPIConfig for removing of domains from logon names

* Update helper text for StripDomainNames option

* Make sure handleSignIn() is called after a new user object is created by SSPI auth method

* Remove default value from text of form field helper

Co-Authored-By: Lauris BH <lauris@nix.lv>
* Remove default value from text of form field helper

Co-Authored-By: Lauris BH <lauris@nix.lv>
* Remove default value from text of form field helper

Co-Authored-By: Lauris BH <lauris@nix.lv>
* Only make a query to the DB to check if SSPI is enabled on handlers that need that information for templates

* Remove code duplication

* Log errors in ActiveLoginSources

Co-Authored-By: Lauris BH <lauris@nix.lv>
* Revert suffix of randomly generated E-mails for Reverse proxy authentication

Co-Authored-By: Lauris BH <lauris@nix.lv>
* Revert unneeded white-space change in template

Co-Authored-By: Lauris BH <lauris@nix.lv>
* Add copyright comments at the top of new files

* Use loopback name for randomly generated emails

* Add locale tag for the SSPISeparatorReplacement field with proper casing

* Revert casing of SSPISeparatorReplacement field in locale file, moving it up, next to other form fields

* Update docs/content/doc/features/authentication.en-us.md

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Remove Priority() method and define the order in which SSO auth methods should be executed in one place

* Log authenticated username only if it's not empty

* Rephrase helper text for automatic creation of users

* Return error if more than one active SSPI auth source is found

* Change newUser() function to return error, letting caller log/handle the error

* Move isPublicResource, isPublicPage and handleSignIn functions outside SSPI auth method to allow other SSO methods to reuse them if needed

* Refactor initialization of the list containing SSO auth methods

* Validate SSPI settings on POST

* Change SSPI to only perform authentication on its own login page, API paths and download links. Leave Toggle middleware to redirect non authenticated users to login page

* Make 'Default language' in SSPI config empty, unless changed by admin

* Show error if admin tries to add a second authentication source of type SSPI

* Simplify declaration of global variable

* Rebuild gitgraph.js on Linux

* Make sure config values containing only whitespace are not accepted

4 years agoSend tag create and push webhook when release created on UI (#8671)
Benno [Fri, 22 Nov 2019 22:13:57 +0000 (06:13 +0800)]
Send tag create and push webhook when release created on UI (#8671)

* 'update'

* Send push tag event when release created

* send tag create event while release created in UI

* update to go v1.13

* fix gofmt error

* update #8671 move release tag created hook to modules/notification/webhook due to #8802 refactoring

* use NotifyCreateRef and NotifyPushCommits instead of NotifyNewReleaseTag

* move tag notification to correct place

4 years agoRun make fmt on master (#9129)
David Svantesson [Fri, 22 Nov 2019 21:00:01 +0000 (22:00 +0100)]
Run make fmt on master (#9129)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 22 Nov 2019 14:54:19 +0000 (14:54 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix race condition in ReplaceSanitizer (#9123)
zeripath [Fri, 22 Nov 2019 14:46:39 +0000 (14:46 +0000)]
Fix race condition in ReplaceSanitizer (#9123)

4 years agofixed reCAPTCHA URL (#9083)
Koichi MATSUMOTO [Fri, 22 Nov 2019 08:03:45 +0000 (17:03 +0900)]
fixed reCAPTCHA URL (#9083)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 22 Nov 2019 07:02:24 +0000 (07:02 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoHide credentials when submitting migration (#9102)
Jordan [Fri, 22 Nov 2019 06:37:37 +0000 (00:37 -0600)]
Hide credentials when submitting migration (#9102)

through API.
Same fix, using form.CloneAddr instead of opts.CloneAddr.

4 years agomove semantic.dropdown.custom.js to webpack (#9064)
silverwind [Thu, 21 Nov 2019 23:30:14 +0000 (00:30 +0100)]
move semantic.dropdown.custom.js to webpack (#9064)

* move semantic.dropdown.custom.js to webpack

Also disabled a annoying linter rule which insisted that imports can not
contain a file extension.

Fixes: https://github.com/go-gitea/gitea/issues/8971
* reorganize web_src files and rebuild

* restart ci

4 years agoAdd USE_SERVICE_WORKER setting (#9110)
silverwind [Thu, 21 Nov 2019 20:06:23 +0000 (21:06 +0100)]
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

4 years agoAdd Graceful shutdown for Windows and hooks for shutdown of goroutines (#8964)
zeripath [Thu, 21 Nov 2019 18:32:02 +0000 (18:32 +0000)]
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

4 years agoMove merge actions to notification (#9024)
Lunny Xiao [Thu, 21 Nov 2019 17:08:42 +0000 (01:08 +0800)]
Move merge actions to notification (#9024)

* Move merge actions to notification

* Add missing mail notification

4 years agoMove HttpBackend function to Http to reduce function calls when git smart http reques...
Lunny Xiao [Thu, 21 Nov 2019 16:24:43 +0000 (00:24 +0800)]
Move HttpBackend function to Http to reduce function calls when git smart http requests (#9057)

4 years ago[fix] typo (#9104)
maicss [Thu, 21 Nov 2019 13:27:05 +0000 (21:27 +0800)]
[fix] typo (#9104)

4 years agoAdd template repositories to comparison (#9101)
John Olheiser [Wed, 20 Nov 2019 22:23:45 +0000 (16:23 -0600)]
Add template repositories to comparison (#9101)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoFix nil context user (#9099)
John Olheiser [Wed, 20 Nov 2019 19:44:35 +0000 (13:44 -0600)]
Fix nil context user (#9099)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoHide given credentials for migrated repos. (#9097)
Jordan [Wed, 20 Nov 2019 18:01:09 +0000 (12:01 -0600)]
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

4 years agoRefactor Issues Subscription (#8738)
6543 [Wed, 20 Nov 2019 14:50:54 +0000 (15:50 +0100)]
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

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 20 Nov 2019 11:58:10 +0000 (11:58 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoTeam permission to create repository in organization (#8312)
David Svantesson [Wed, 20 Nov 2019 11:27:49 +0000 (12:27 +0100)]
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

4 years agoExplore page: Add topic param to pagination (#9077) (#9078)
David Svantesson [Wed, 20 Nov 2019 09:07:09 +0000 (10:07 +0100)]
Explore page: Add topic param to pagination (#9077) (#9078)

4 years agoFix doc example for asciidoc (#9072)
guillep2k [Wed, 20 Nov 2019 06:17:14 +0000 (03:17 -0300)]
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>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 20 Nov 2019 05:34:34 +0000 (05:34 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoupdate golang.org/x/crypto vendor to use acme v2 (#9056)
techknowlogick [Wed, 20 Nov 2019 05:30:46 +0000 (00:30 -0500)]
update golang.org/x/crypto vendor to use acme v2 (#9056)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 20 Nov 2019 00:16:19 +0000 (00:16 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix password checks on admin create/edit user (#9076)
guillep2k [Wed, 20 Nov 2019 00:07:51 +0000 (21:07 -0300)]
Fix password checks on admin create/edit user (#9076)

* Fix password checks on admin create/edit user

* Remove incorrect trimspace

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 19 Nov 2019 23:06:30 +0000 (23:06 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoAdd password requirement info on error (#9074)
guillep2k [Tue, 19 Nov 2019 22:44:58 +0000 (19:44 -0300)]
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>
4 years agoContext menus for comments (#9043)
John Olheiser [Tue, 19 Nov 2019 18:33:42 +0000 (12:33 -0600)]
Context menus for comments (#9043)

* Add quote replies

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 19 Nov 2019 07:37:59 +0000 (07:37 +0000)]
[skip ci] Updated translations via Crowdin

4 years agofix placeholders in the error message (#9060)
Iwasa Kazmi [Tue, 19 Nov 2019 07:35:37 +0000 (16:35 +0900)]
fix placeholders in the error message (#9060)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 19 Nov 2019 00:06:09 +0000 (00:06 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoAvoid re-issuing redundant cross-references. (#8734)
guillep2k [Mon, 18 Nov 2019 23:43:03 +0000 (20:43 -0300)]
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

4 years agofix: add search to reserved usernames (#9063)
Antoine GIRARD [Mon, 18 Nov 2019 20:03:25 +0000 (21:03 +0100)]
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>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 18 Nov 2019 17:06:44 +0000 (17:06 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoAllow authors to use act keywords in PR content (#9059)
guillep2k [Mon, 18 Nov 2019 17:03:49 +0000 (14:03 -0300)]
Allow authors to use act keywords in PR content (#9059)

4 years agoClose/reopen issues by keywords in titles and comments (#8866)
guillep2k [Mon, 18 Nov 2019 13:13:07 +0000 (10:13 -0300)]
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

4 years agoRewrite delivery of issue and comment mails (#9009)
guillep2k [Mon, 18 Nov 2019 08:08:20 +0000 (05:08 -0300)]
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

4 years agoMove modules/gzip to gitea.com/macaron/gzip (#9058)
Lunny Xiao [Mon, 18 Nov 2019 05:18:33 +0000 (13:18 +0800)]
Move modules/gzip to gitea.com/macaron/gzip (#9058)

* Move modules/gzip to gitea.com/macaron/gzip

* Fix vendor

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 18 Nov 2019 01:29:04 +0000 (01:29 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix double scroll in branch dropdown (#9048)
Vedran [Mon, 18 Nov 2019 01:25:24 +0000 (02:25 +0100)]
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

4 years agoenable lazy-loading of gitgraph.js (#9036)
silverwind [Sun, 17 Nov 2019 21:39:06 +0000 (22:39 +0100)]
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.

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 17 Nov 2019 19:44:07 +0000 (19:44 +0000)]
[skip ci] Updated translations via Crowdin

4 years agowiki - add 'write' 'preview' buttons to wiki edit like in issues (#7241)
Cherrg [Sun, 17 Nov 2019 19:42:44 +0000 (20:42 +0100)]
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>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 17 Nov 2019 14:13:14 +0000 (14:13 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoAdd first issue comment hashtag (#9052)
jaqra [Sun, 17 Nov 2019 14:00:39 +0000 (17:00 +0300)]
Add first issue comment hashtag (#9052)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 17 Nov 2019 06:31:35 +0000 (06:31 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoHandle setting default branch via API (#9030)
David Svantesson [Sun, 17 Nov 2019 06:30:01 +0000 (07:30 +0100)]
Handle setting default branch via API (#9030)

4 years agoUpdate branch API endpoint to show effective branch protection. (#9031)
David Svantesson [Sat, 16 Nov 2019 19:39:18 +0000 (20:39 +0100)]
Update branch API endpoint to show effective branch protection. (#9031)

* Add API endpoint for displaying effective branch protection.

* Add status checks.

4 years agointegrations: fix dropped errors in TestCreateOrUpdateRepoFileForUpdateWithFileMove...
Lars Lehtonen [Sat, 16 Nov 2019 18:21:39 +0000 (10:21 -0800)]
integrations: fix dropped errors in TestCreateOrUpdateRepoFileForUpdateWithFileMove() (#9040)

integrations: fix dropped error in lfsCommitAndPushTest()

4 years agoOnly return JSON for add/remove all (#9028)
John Olheiser [Sat, 16 Nov 2019 17:36:13 +0000 (11:36 -0600)]
Only return JSON for add/remove all (#9028)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoCheck compiled files during build (#9042)
Gary Kim [Sat, 16 Nov 2019 14:15:07 +0000 (22:15 +0800)]
Check compiled files during build (#9042)

Signed-off-by: Gary Kim <gary@garykim.dev>
4 years agoButton tooltip formatting under Branches (#9034)
Vedran [Sat, 16 Nov 2019 12:03:07 +0000 (13:03 +0100)]
Button tooltip formatting under Branches (#9034)

* Fixes button tooltip formatting under Branches

* Formatting on download button for default branch

4 years agoAdd retry for migration http/https requests (#9019)
Lunny Xiao [Sat, 16 Nov 2019 08:30:06 +0000 (16:30 +0800)]
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

4 years agowiki - editor - enable side-by-side button (#7242)
Cherrg [Sat, 16 Nov 2019 02:20:07 +0000 (03:20 +0100)]
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>
4 years agoMove git graph from models to modules/graph (#9027)
Lunny Xiao [Sat, 16 Nov 2019 00:47:57 +0000 (08:47 +0800)]
Move git graph from models to modules/graph (#9027)