2
0
Commit Graph

1593 Commits

Author SHA1 Message Date
Codruț Constantin Gușoi
7370e64e0e Implements generator cli for secrets (#3531)
Signed-off-by: Codruț Constantin Gușoi <codrut.gusoi@gmail.com>
2018-02-18 20:14:37 +02:00
Piotr Orzechowski
285a399137 Add option to enable or disable swagger endpoints (#3502) 2018-02-14 06:46:00 +02:00
Jonas Franz
9fb6ae4b0a Escape search query (#3486)
Signed-off-by: Jonas Franz <info@jonasfranz.de>
2018-02-11 15:42:28 +02:00
Ethan Koenig
f2d7f488a2 Reduce repo indexer disk usage (#3452) 2018-02-05 20:29:17 +02:00
Morgan Bazalgette
09e97c98c4 Enable caching on assets and avatars (#3376)
* Enable caching on assets and avatars

Fixes #3323

* Only set avatar in user BeforeUpdate when there is no avatar set

* add error checking after stat

* gofmt

* Change cache time for avatars to an hour
2018-02-04 00:37:05 +02:00
Christian Köberl
ed1618f274 Allow square brackets in external issue patterns (#3408)
* Allow square brackets in external issue patterns

* Added false test cases for checklist elements
2018-02-03 11:51:02 +02:00
Antoine GIRARD
e4fb8feb18 Add sensitive headers (#3429)
* Add HeaderWithSensitiveCase methods to respect casing

* Update webhook.go
2018-01-31 00:09:16 +02:00
Lauris BH
d7802b5d96 Fix go-get content type (#3426) 2018-01-29 19:50:04 +02:00
Lauris BH
fb7d0088ae Add doctype to go-get=1 reponse (#3423) 2018-01-29 03:12:04 +02:00
Antoine GIRARD
73cc178040 Fix SSH auth lfs locks (#3152)
* Fix SSH auth LFS locks

* Activate SSH/lock test

* Remove debug

* Follow @lunny recommendation for AfterLoad method
2018-01-27 18:48:15 +02:00
Lauris BH
e08df21987 Recognize more characters in crossreferenced repo name (#3413) 2018-01-27 14:33:32 +02:00
Morgan Bazalgette
4b1acda37d HTML escape all lines of the search result (#3402)
Fixes #3383.
2018-01-22 23:28:16 +02:00
Sandro Santilli
d75aa71d32 Use GiteaServer as the user agent for http requests (#3404)
Otherwise we're still presenting ourselves as GogsServer...
2018-01-22 22:37:14 +02:00
Lauris BH
36b7ed7a29 Remove hardcoded paths to fix randomly failing tests (#3347)
* Remove hardcoded paths to fix randomly failing tests

* Use correct function for merge path
2018-01-11 00:46:59 +01:00
Morgan Bazalgette
2173e7d6b1 Handle refactor (#3339)
* Replace all ctx.Handle with ctx.ServerError or ctx.NotFound

* Change Handle(403) to NotFound, avoid using macaron's NotFound
2018-01-10 23:34:17 +02:00
Sandro Santilli
71d32057f8 Enable Libravatar by default in new installations (#3287)
Pre-existing installs still have it default to off.
This is consistent with OpenID setting.
2018-01-07 11:41:09 +02:00
Vlad Temian
92b23dc689 Writable deploy keys (closes #671) (#3225)
* Add is_writable checkbox to deploy keys interface

* Add writable key option to deploy key form

* Add support for writable ssh keys in the interface

* Rename IsWritable to ReadOnly

* Test: create read-only and read-write deploy keys via api

* Add DeployKey access mode migration

* Update gitea sdk via govendor

* Fix deploykey migration

* Add unittests for writable deploy keys

* Move template text to locale

* Remove implicit column update

* Remove duplicate locales

* Replace ReadOnly field with IsReadOnly method

* Fix deploy_keys related integration test

* Rename v54 migration with v55

* Fix migration hell
2018-01-07 00:55:53 +02:00
Lauris BH
a40e00417c Add Pull Request merge options - Ignore white-space for conflict checking, Rebase, Squash merge (#3188)
* Pull request options migration and UI in settings

* Add ignore whitespace functionality

* Fix settings if pull requests are disabled

* Fix migration transaction

* Merge with Rebase functionality

* UI changes and related functionality for pull request merging button

* Implement squash functionality

* Fix rebase merging

* Fix pull request merge tests

* Add squash and rebase tests

* Fix API method to reuse default message functions

* Some refactoring and small fixes

* Remove more hardcoded values from tests

* Remove unneeded check from API method

* Fix variable name and comment typo

* Fix reset commit count after PR merge
2018-01-05 20:56:50 +02:00
Mike Fellows
10529bd508 Add an option to allow redirect of http port 80 to https. (#1928)
* Add an option to allow redirect of http port 80 to https.

This is an "opt in" option (default is to not redirect).  It will only redirect
if protocol is https and the new REDIRECT_PORT_80 option is set to true.

The Port to redirect in previous commit was hardcoded to 80, now it can be
specified in the app.ini, defaulting to 80.  The boolean option to turn
redirection on has been changed to REDIRECT_OTHER_PORT to be logically
consistent with the new port option.

Signed-off-by: Mike Fellows <mike.fellows@shaw.ca>
2017-12-25 23:23:43 +01:00
Ethan Koenig
8b00d90e32 Fix ignored errors when checking if organization, team member (#3177) 2017-12-21 09:43:26 +02:00
Lunny Xiao
1295d48e08 Support default private when creating or migrating repository (#3239)
* support default private when creating or migrating repository

* fix fmt

* use string constants on repository default private in app.ini

* fix fmt
2017-12-20 06:59:56 -06:00
Ethan Koenig
9dc492220e Unit tests for routers/repo/issue_label (#3198) 2017-12-15 23:11:02 +02:00
Lunny Xiao
e9f4ff0997 Improvements for supporting UI Location (#3146)
* improvements for supporting UI Location

* improved the comment
2017-12-14 07:45:31 +08:00
Ethan Koenig
4bb3cd064e Fix new pull request link (#3133)
* Fix new pull request link

* Only show button for branches
2017-12-13 13:06:25 +08:00
Lunny Xiao
1539bd5c3b Refactor struct's time to remove unnecessary memory usage (#3142)
* refactor struct's time to remove unnecessary memory usage

* use AsTimePtr simple code

* fix tests

* fix time compare

* fix template on gpg

* use AddDuration instead of Add
2017-12-11 06:37:04 +02:00
Lunny Xiao
f4e179277d Fix compile failed without gcc (#3130)
* fix comile failed without gcc

* add sqlite tag for unit test
2017-12-10 16:08:19 +02:00
Antoine GIRARD
81e42f6449 Improve LFS tests + fix lfs url refs + keep path upper/lowercase in db. (#3092)
* Add failing test

* Fix urls

* Improve url in tests

* improve testing

* Remove debug code

* Add deps

* LFS corner-case : Search on lower but store with case

* Temporary comment of blocking action

* fix hooks

* Use temporary repo for git client test

* Use userPassword in place of hard-coded password
2017-12-08 20:21:37 +08:00
Ethan Koenig
14ac1f6ddc Fix missing branch in release bug (#3108) 2017-12-08 13:22:02 +08:00
Ethan Koenig
a70356c12b Fix legacy URL redirects (#3100) 2017-12-07 09:09:02 +08:00
Lunny Xiao
cb30fe72b1 fix redis cache failed (#3086) 2017-12-04 23:00:14 +08:00
Ethan Koenig
856188bcef Fix error message sanitiziation (#3082) 2017-12-04 03:48:03 +02:00
Lauris BH
c5bbb9ed4b Add reactions to issues/PR and comments (#2856) 2017-12-04 01:14:26 +02:00
techknowlogick
d1e8a41a10 Minor copy changes (#3074)
* Minor copy changes
Fixes #3058

* Use TrN for translations that depend on count
Fix minor type with branches count
2017-12-03 22:52:30 +02:00
Ethan Koenig
3fa7629bfc Fix avatar URLs (#3069)
* Fix avatar URLs

* import order
2017-12-03 19:55:13 +08:00
Lunny Xiao
5579f632e8 Fix missing password length check when change password (#3039)
* fix missing password length check when change password

* add tests for change password
2017-12-02 19:11:22 +02:00
Lunny Xiao
a15d8c22e1 Remove GetRepositoryByRef and add GetRepositoryByOwnerAndName (#3043)
* remove GetRepositoryByRef and add GetRepositoryByOwnerAndName

* fix tests

* fix tests bug

* some improvements
2017-12-02 15:34:39 +08:00
Piotr Orzechowski
c9c48e4693 Default log level to Info without hardcoding it in installer (#3041) 2017-12-01 15:41:27 +08:00
Ethan Koenig
ffecdec7a8 Unit tests for wiki routers (#3022) 2017-11-30 17:52:15 +02:00
Sondre Nilsen
d8c2c3d35e Expandable commit bodies (#2980)
* Initial working state of expandable commit bodies

* Fix all commits having showing button for multiline commits

* Refactor checking multiline messages method

* Force newlines with <br> in commit body

* Show multiple lines in the list view of repositories

* Fixed proper newlines and minor refactor

Use <pre> instead of <p>, this is so we can use \n instead of having to manually place <br> into the HTML. Makes it easier to display commit bodies.

* Fix commit list messages jumping around

* Fix indentation in view_list.tmpl

* Use vertical-align: baseline instead of top

* Refactor commit button toggle function

* Remove RenderCommitBodyLink function

* Add comments

* Add newline at the end of _repository.less

* Fix long commit bodies not properly wrapping inside <pre>

* Don't split on double newlines

* Show the commit body in commit view

* Update stylesheets

* Add/fix comments and run make fmt

* Fix spaces not being tabs
2017-11-30 13:08:40 +08:00
Ethan Koenig
f1c559cead Removed unused field in form (#3023) 2017-11-29 22:52:34 +02:00
Sandro Santilli
270fc468ff Set OpenID support on by default when installing new instance (#3010) 2017-11-29 14:47:42 +02:00
Duncan Ogilvie
7bc387bffe Memory usage improvements (#3013)
* govendor update code.gitea.io/git

Signed-off-by: Duncan Ogilvie <mr.exodia.tpodt@gmail.com>

* Greatly improve memory usage

Signed-off-by: Duncan Ogilvie <mr.exodia.tpodt@gmail.com>
2017-11-29 09:50:39 +08:00
Antoine GIRARD
dcabc76714 Fix git lfs path (#3016)
* add suffix .git

* Remove Content-Type on GET methods

* Add migrations to force creation before any further potential migration
2017-11-29 01:35:23 +02:00
Antoine GIRARD
eaff4b06ed Git LFS lock api (#2938)
* Implement routes

* move to api/sdk and create model

* Implement add + list

* List return 200 empty list no 404

* Add verify lfs lock api

* Add delete and start implementing auth control

* Revert to code.gitea.io/sdk/gitea vendor

* Apply needed check for all lfs locks route

* Add simple tests

* fix lint

* Improve tests

* Add delete test + fix

* Add lfs ascii header

* Various fixes from review + remove useless code + add more corner case testing

* Remove repo link since only id is needed.

Save a little of memory and cpu time.

* Improve tests

* Use TEXT column format for path + test

* fix mispell

* Use NewRequestWithJSON for POST tests

* Clean path

* Improve DB format

* Revert uniquess repoid+path

* (Re)-setup uniqueness + max path length

* Fixed TEXT in place of VARCHAR

* Settle back to maximum VARCHAR(3072)

* Let place for repoid in key

* Let place for repoid in key

* Let place for repoid in key

* Revert back
2017-11-28 22:58:37 +02:00
Ethan Koenig
7c56820685 Various wiki bug fixes (#2996)
* Update macaron

* Various wiki bug fixes
2017-11-28 17:43:51 +08:00
Lauris BH
b18cd29792 Fix go-get, src and raw urls to new scheme (#2978) 2017-11-27 02:58:54 +02:00
Piotr Orzechowski
18b57056ca Fix language names (#2955) 2017-11-23 12:00:48 +08:00
Ethan Koenig
10d77fe376 Fix over-escaped characters (#2956) 2017-11-22 15:09:48 +08:00
Lunny Xiao
ea4f22c5ac Add dingtalk webhook (#2777)
* add dingtalk webhook type

* add vendor

* some fixes

* fix name check

* fix name check & improvment
2017-11-21 06:26:43 +02:00
Jonas Bröms
6765671642 Drop deprecated GOGS_WORK_DIR use (#2946) 2017-11-21 09:52:47 +08:00