]> source.dussan.org Git - gitea.git/log
gitea.git
5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 18 Feb 2019 20:57:13 +0000 (20:57 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoImplement "conversation lock" for issue comments (#5073)
Lanre Adelowo [Mon, 18 Feb 2019 20:55:04 +0000 (21:55 +0100)]
Implement "conversation lock" for issue comments (#5073)

5 years agoAllow to set organization visibility (public, internal, private) (#1763)
Rémy Boulanouar [Mon, 18 Feb 2019 16:00:27 +0000 (17:00 +0100)]
Allow to set organization visibility (public, internal, private) (#1763)

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 18 Feb 2019 12:37:04 +0000 (12:37 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoMove to ldap.v3 to fix #5928 (#6105)
zeripath [Mon, 18 Feb 2019 12:34:37 +0000 (12:34 +0000)]
Move to ldap.v3 to fix #5928 (#6105)

Signed-off-by: Andrew Thornton <art27@cantab.net>
5 years agoUpdate bleve dependency to latest master revision (#6100)
Lunny Xiao [Mon, 18 Feb 2019 00:50:26 +0000 (08:50 +0800)]
Update bleve dependency to latest master revision (#6100)

* update bleve to master b17287a86f6cac923a5d886e10618df994eeb54b6724eac2e3b8dde89cfbe3a2

* remove unused pkg from dep file

* change bleve from master to recent revision

5 years agoFix deadlock in webhook PullRequest (#6102)
zeripath [Sun, 17 Feb 2019 21:12:39 +0000 (21:12 +0000)]
Fix deadlock in webhook PullRequest (#6102)

Signed-off-by: Andrew Thornton <art27@cantab.net>
5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 17 Feb 2019 05:46:51 +0000 (05:46 +0000)]
[skip ci] Updated translations via Crowdin

5 years agomodules/context/auth.go: fix redirect loop (#5965)
xdch47 [Sun, 17 Feb 2019 05:44:25 +0000 (06:44 +0100)]
modules/context/auth.go: fix redirect loop (#5965)

Closes #5815

5 years agoAllow labels to contain emoji (#6063)
John Olheiser [Sat, 16 Feb 2019 17:33:09 +0000 (11:33 -0600)]
Allow labels to contain emoji (#6063)

* Add emoji to labels
Minor cleanup of tribute code in footer.tmpl

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Quick find/replace in other i18n files containing label translations

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Revert "Quick find/replace in other i18n files containing label translations"

This reverts commit ec3e1a3a1775989301bb2c1cd08e8871b317688d.

* Add style to overwrite emoji height in labels

* Revert Makefile change that makes Windows work

5 years agoadd doc/features/comparison zh-cn translation (#6067)
我没有抓狂 [Sat, 16 Feb 2019 13:12:42 +0000 (21:12 +0800)]
add doc/features/comparison zh-cn translation (#6067)

5 years agoBackport 1.7.2 changelog (#6082)
techknowlogick [Fri, 15 Feb 2019 09:29:26 +0000 (04:29 -0500)]
Backport 1.7.2 changelog (#6082)

* Include changes also from PR #6084

5 years agoRevert "Fix wrapping long code lines in UI" (#6074)
silverwind [Fri, 15 Feb 2019 07:23:20 +0000 (08:23 +0100)]
Revert "Fix wrapping long code lines in UI" (#6074)

This reverts commit e5cd80e0219f10818f43e8cab6b9c814cb1cd796.

Fixes: https://github.com/go-gitea/gitea/issues/6064
5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 14 Feb 2019 18:23:25 +0000 (18:23 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoUpdate .drone.yml (#6070)
techknowlogick [Thu, 14 Feb 2019 18:20:11 +0000 (13:20 -0500)]
Update .drone.yml (#6070)

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 13 Feb 2019 15:47:39 +0000 (15:47 +0000)]
[skip ci] Updated translations via Crowdin

5 years agomake sure labels are actually returned (#6053)
Lanre Adelowo [Wed, 13 Feb 2019 15:45:19 +0000 (16:45 +0100)]
make sure labels are actually returned (#6053)

5 years agoFix panic: template: repo/issue/list:210: unexpected "=" in operand (#6041)
Zsombor [Wed, 13 Feb 2019 08:14:17 +0000 (09:14 +0100)]
Fix panic: template: repo/issue/list:210: unexpected "=" in operand (#6041)

5 years agoUpdate and expand information about building Gitea (#6019)
zeripath [Tue, 12 Feb 2019 16:22:01 +0000 (16:22 +0000)]
Update and expand information about building Gitea (#6019)

* Update and expand building information

Signed-off-by: Andrew Thornton <art27@cantab.net>
* remove extraneous extra line

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix spelling mistake

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Note about documentation for the website

Signed-off-by: Andrew Thornton <art27@cantab.net>
* More changes

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Clarified the automatic build dependency

* Update the from-source to match the hacking information

* Extend quotes

* Update required go and discord link

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update hacking-on-gitea.en-us.md

Add in information about postcss

5 years agoAllow markdown files to read from the LFS (#5787)
zeripath [Tue, 12 Feb 2019 15:09:43 +0000 (15:09 +0000)]
Allow markdown files to read from the LFS (#5787)

This PR makes it possible for the markdown renderer to render images and media straight from the LFS.

Fix #5746

Signed-off-by: Andrew Thornton [art27@cantab.net](mailto:art27@cantab.net)
5 years agoRefactor editor upload, update and delete to use git plumbing and add LFS support...
zeripath [Tue, 12 Feb 2019 13:07:31 +0000 (13:07 +0000)]
Refactor editor upload, update and delete to use git plumbing and add LFS support (#5702)

* Use git plumbing for upload: #5621 repo_editor.go: UploadRepoFile

* Use git plumbing for upload: #5621 repo_editor.go: GetDiffPreview

* Use git plumbing for upload: #5621 repo_editor.go: DeleteRepoFile

* Use git plumbing for upload: #5621 repo_editor.go: UploadRepoFiles

* Move branch checkout functions out of repo_editor.go as they are no longer used there

* BUGFIX: The default permissions should be 100644

    This is a change from the previous code but is more in keeping
    with the default behaviour of git.

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Standardise cleanUploadFilename to more closely match git

See verify_path in: https://github.com/git/git/blob/7f4e64169352e03476b0ea64e7e2973669e491a2/read-cache.c#L951

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Redirect on bad paths

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Refactor to move the uploading functions out to a module

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add LFS support

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update upload.go attribution header

Upload.go is essentially the remnants of repo_editor.go. The remaining code is essentially unchanged from the Gogs code, hence the Gogs attribution.

* Delete upload files after session committed

* Ensure that GIT_AUTHOR_NAME etc. are valid for git

see #5774

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add in test cases per @lafriks comment

* Add space between gitea and github imports

Signed-off-by: Andrew Thornton <art27@cantab.net>
* more examples in TestCleanUploadName

Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix formatting

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Set the SSH_ORIGINAL_COMMAND to ensure hooks are run

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Switch off SSH_ORIGINAL_COMMAND

Signed-off-by: Andrew Thornton <art27@cantab.net>
5 years agoIn basic auth check for tokens before call UserSignIn (#5725)
manuelluis [Tue, 12 Feb 2019 09:20:08 +0000 (10:20 +0100)]
In basic auth check for tokens before call UserSignIn (#5725)

* Check first if user/password is a token

* In basic auth check if user/password is a token

* Remove unnecessary else statement

* Changes of fmt

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 12 Feb 2019 08:40:40 +0000 (08:40 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoAdd the Owner Name to differentiate when merging (#3807)
Luo Yifei [Tue, 12 Feb 2019 08:37:32 +0000 (16:37 +0800)]
Add the Owner Name to differentiate when merging (#3807)

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 11 Feb 2019 17:12:45 +0000 (17:12 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoRun benchmark at tag to track performances (#6035)
Antoine GIRARD [Mon, 11 Feb 2019 17:09:50 +0000 (18:09 +0100)]
Run benchmark at tag to track performances (#6035)

5 years agoAdd autoprefixer to css build (#6029)
silverwind [Mon, 11 Feb 2019 06:13:30 +0000 (07:13 +0100)]
Add autoprefixer to css build (#6029)

* Add autoprefixer to css build

* also use autoprefixer on theme files

5 years agofix #3200 (#6033)
Lanre Adelowo [Mon, 11 Feb 2019 01:27:24 +0000 (02:27 +0100)]
fix #3200 (#6033)

5 years agoupdate docs (#6032)
Lanre Adelowo [Sun, 10 Feb 2019 22:10:00 +0000 (23:10 +0100)]
update docs (#6032)

5 years agoAdd option to close issues via commit on a non master branch (#5992)
Lanre Adelowo [Sun, 10 Feb 2019 19:27:19 +0000 (20:27 +0100)]
Add option to close issues via commit on a non master branch (#5992)

* fixes #5957

* add tests to make sure config option is respected

* use already defined struct

* - use migration to make the flag repo wide not for the entire gitea instance
Also note that the config value can still be set so as to be able to control the value for new repositories that are to be created

- fix copy/paste error in copyright header year and rearrange import

- use repo config instead of server config value to determine if a commit should close an issue

- update testsuite

* use global config only when creating a new repository

* allow repo admin toggle feature via UI

* fix typo and improve testcase

* fix fixtures

* add DEFAULT prefix to config value

* fix test

5 years agoCreate repository on organisation by default on its dashboard (#6026)
zeripath [Sun, 10 Feb 2019 13:30:25 +0000 (13:30 +0000)]
Create repository on organisation by default on its dashboard (#6026)

* Create repository on organisation by default on its dashboard
* Only show owners the add new repositories to an organisation button.

Fix #3253

Signed-off-by: Andrew Thornton <art27@cantab.net>
5 years agoSplit setting.go as multiple files (#6014)
Lunny Xiao [Sun, 10 Feb 2019 01:37:37 +0000 (09:37 +0800)]
Split setting.go as multiple files (#6014)

* split setting.go as multiple files

* fix comments

5 years agoadd default time out for git operations (#6015)
Lunny Xiao [Sat, 9 Feb 2019 22:44:24 +0000 (06:44 +0800)]
add default time out for git operations (#6015)

5 years agoUI: Make dashboard navbar and footer full-width (#6013)
silverwind [Sat, 9 Feb 2019 15:07:38 +0000 (16:07 +0100)]
UI: Make dashboard navbar and footer full-width (#6013)

* UI: Make dashboard navbar full-width

* more tweaks: full-width footer and consistent padding

* fix page layout causing unneccesary scrollbars on small pages

5 years agodisable git fsck for mirrored repos by default (#6018)
Lanre Adelowo [Sat, 9 Feb 2019 14:34:50 +0000 (15:34 +0100)]
disable git fsck for mirrored repos by default (#6018)

5 years agoRemove extra spaces (#6016)
Thomas Loubiou [Sat, 9 Feb 2019 12:48:28 +0000 (13:48 +0100)]
Remove extra spaces (#6016)

5 years agoFix metrics auth token detection (#6006)
Paul [Sat, 9 Feb 2019 05:58:31 +0000 (07:58 +0200)]
Fix metrics auth token detection (#6006)

Signed-off-by: Pauls Barkans <paulsb@gmail.com>
5 years agoIncrease the version of less (#6010)
zeripath [Sat, 9 Feb 2019 03:00:07 +0000 (03:00 +0000)]
Increase the version of less (#6010)

5 years agofix header menu misalignment (#6002)
silverwind [Fri, 8 Feb 2019 17:18:22 +0000 (18:18 +0100)]
fix header menu misalignment (#6002)

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 8 Feb 2019 16:48:45 +0000 (16:48 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoFeature - #3031 - search for org repos (#5986)
Richard Mahn [Fri, 8 Feb 2019 16:45:43 +0000 (09:45 -0700)]
Feature - #3031 - search for org repos (#5986)

5 years agoFix #5799 - swagger for mergePullRequest (#5996)
Thomas Loubiou [Fri, 8 Feb 2019 08:08:38 +0000 (09:08 +0100)]
Fix #5799 - swagger for mergePullRequest (#5996)

5 years agoEnhance closed PR and Issue status in the list (#6000)
Lanre Adelowo [Fri, 8 Feb 2019 07:53:58 +0000 (08:53 +0100)]
Enhance closed PR and Issue status in the list (#6000)

* working version

* Update options/locale/locale_en-US.ini

Co-Authored-By: adelowo <adelowomailbox@gmail.com>
* update templates

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 8 Feb 2019 07:21:32 +0000 (07:21 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoUI: Make navbar full width (#5998)
silverwind [Fri, 8 Feb 2019 07:19:21 +0000 (08:19 +0100)]
UI: Make navbar full width (#5998)

5 years agoUI: Fix repo header issues (#5995)
silverwind [Thu, 7 Feb 2019 17:20:26 +0000 (18:20 +0100)]
UI: Fix repo header issues (#5995)

Fixes: https://github.com/go-gitea/gitea/issues/5985
5 years agoUpdate U2F section defaults (#5994)
John Olheiser [Thu, 7 Feb 2019 15:47:40 +0000 (09:47 -0600)]
Update U2F section defaults (#5994)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years agoAdd API to list tags (#5850)
Lunny Xiao [Thu, 7 Feb 2019 12:00:52 +0000 (20:00 +0800)]
Add API to list tags (#5850)

* Add API to list tags

* update dependency gitea sdk vendor

* fix swagger generation

* fix swagger

* add tests

* update code.gitea.io/git vendor

5 years agouse native golang SSH library but ssh-keygen when enable built-in SSH server to remov...
Lunny Xiao [Thu, 7 Feb 2019 07:13:12 +0000 (15:13 +0800)]
use native golang SSH library but ssh-keygen when enable built-in SSH server to remove dependent on that command lines (#5976)

* use native golang SSH library but ssh-keygen when enable built-in SSH server to remove dependent on that command lines

* fix tests and add comment head

5 years agofix bug when deleting a linked account will removed all (#5989)
Lunny Xiao [Thu, 7 Feb 2019 06:51:23 +0000 (14:51 +0800)]
fix bug when deleting a linked account will removed all (#5989)

5 years agoExpose issue stopwatch toggling via API (#5970)
Lanre Adelowo [Thu, 7 Feb 2019 02:57:25 +0000 (03:57 +0100)]
Expose issue stopwatch toggling via API (#5970)

5 years agoFix empty ssh key importing in ldap (#5984)
zeripath [Thu, 7 Feb 2019 02:38:28 +0000 (02:38 +0000)]
Fix empty ssh key importing in ldap (#5984)

5 years agoSupport n as a line highlight prefix (#5987)
Monty Taylor [Thu, 7 Feb 2019 02:25:23 +0000 (20:25 -0600)]
Support n as a line highlight prefix (#5987)

We're working on rolling out gitea as a replacement for a fairly
large cgit installation. Part of this involves a metric ton of
mod_rewrite rules so that links people have out in the wild will
still work. Unfortunately, cgit uses #n1 in the url to indicate
a single line highlight, which doesn't get passed to the server
and therefore can't be rewritten.

We've got a local workaround by shoving a script block into a
custom header template, but thought it might be nicer to upstream
a simple patch to support #n as a prefix for single line highlights.
(luckily for simplicity, cgit does not support ranges)

Signed-off-by: Monty Taylor <mordred@inaugust.com>
5 years agoFeature - Pagination for git tree API (#5838)
Richard Mahn [Wed, 6 Feb 2019 18:19:26 +0000 (11:19 -0700)]
Feature - Pagination for git tree API (#5838)

* Feature - Pagination for git tree API

* Handles case when page is negative

* Does a for loop over the start and end rather than all entries

* Removed redundent logic

* Adds per_page as a query parameter

* Adds DEFAULT_GIT_TREES_PER_PAGE for settings, ran make fmt

* Fix typo in cheat-sheet en

* Makes page start at 1, generated swagger

* Use updates to SDK

* Updates to use latest sdk

* Updates swagger for tree api

* Adds test for GetTreeBySHA

* Updates per PR reviews

* Updates per PR reviews

* Remove file

* Formatting

* Fix to swagger file

* Fix to swagger

* Update v1_json.tmpl

* Fix to swagger file

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 6 Feb 2019 16:20:58 +0000 (16:20 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoAdmin config page mailertype setting option update (#5973)
techknowlogick [Wed, 6 Feb 2019 16:17:58 +0000 (11:17 -0500)]
Admin config page mailertype setting option update (#5973)

* Fix #5972

5 years agoUI: Dashboard tweaks (#5974)
silverwind [Wed, 6 Feb 2019 07:09:13 +0000 (08:09 +0100)]
UI: Dashboard tweaks (#5974)

- Don't show divider below heatmap when it's hidden via media-query
- Make divider between user menu adhere to container width
- Remove excessiv margins on heatmap

5 years agoAllow Macaron to be set to log through to gitea.log (#5667)
zeripath [Wed, 6 Feb 2019 03:06:41 +0000 (03:06 +0000)]
Allow Macaron to be set to log through to gitea.log (#5667)

* Allow Macaron to be set to log through gitea.log

Fix #4291

5 years agoFix serving of raw wiki files other than .md (#5814)
Gabriel Silva Simões [Wed, 6 Feb 2019 01:58:55 +0000 (20:58 -0500)]
Fix serving of raw wiki files other than .md (#5814)

* Fix serving of raw wiki files other than .md

Closes #4690.
Closes #4395.

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
* Simplify code at routers/repo/wiki.go

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
* Add more files to user2/repo1.wiki for testing

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
* Update macaron to v1.3.2

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
* Add tests for WikiRaw

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
* Fix NewResponseWriter usage due to macaron update

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
* Add raw to reserved wiki names

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
5 years ago Upgrade alpine to 3.9 (#5909)
techknowlogick [Tue, 5 Feb 2019 22:53:23 +0000 (17:53 -0500)]
 Upgrade alpine to 3.9 (#5909)

5 years agoUI: Repo header tweaks (#5945)
silverwind [Tue, 5 Feb 2019 21:59:26 +0000 (22:59 +0100)]
UI: Repo header tweaks (#5945)

* UI: Repo header tweaks

- Use basic buttons on the header buttons, matching gogs
- Make 'Manage topic' text smaller, remove margin-left with no topics
present
- Move various inline styles to CSS
- Use flexbox on header title and buttons

* fix indentation

* reverse media query wrapping

* fix inconsisten whitespace

5 years agoDisplay the branch name in the commit view (#5950)
Lanre Adelowo [Tue, 5 Feb 2019 21:47:01 +0000 (22:47 +0100)]
Display the branch name in the commit view (#5950)

* add branch info

* Remove blank lines

* Remove blank lines

* update git dependency

5 years agoUI: Fixes for repo topic editor (#5971)
silverwind [Tue, 5 Feb 2019 20:40:56 +0000 (21:40 +0100)]
UI: Fixes for repo topic editor (#5971)

- Properly hides the edit interface when saving a empty topic list
- Align the Done button with the edit box

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 5 Feb 2019 16:55:17 +0000 (16:55 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoadd other session providers (#5963)
techknowlogick [Tue, 5 Feb 2019 16:52:51 +0000 (11:52 -0500)]
add other session providers (#5963)

5 years agoPull request conflict files detection (#5951)
Lunny Xiao [Tue, 5 Feb 2019 11:54:49 +0000 (19:54 +0800)]
Pull request conflict files detection (#5951)

* add conflict detection

* test pull request conflict files

* fix detection files number

* fix comments

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 5 Feb 2019 11:40:36 +0000 (11:40 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoAutomatically clear stopwatch on merging a PR (#4327)
Lanre Adelowo [Tue, 5 Feb 2019 11:38:11 +0000 (12:38 +0100)]
Automatically clear stopwatch on merging a PR (#4327)

* Don't display buttons if there are no notices

* clear stopwatch on merging a PR

* remove redundant gt check

* use ctx.Flash as per @bkcsoft comment

* stop timer on closing issues/PRs too

* updated translation as per review

* redirect to login page after successfully activating account

* remove unrelated changes

* stop timer for issues that are closed via commits too..Not just the 'close' UI button

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 4 Feb 2019 15:23:15 +0000 (15:23 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoAdd label names as filter in issue search api (#5946)
Lanre Adelowo [Mon, 4 Feb 2019 15:20:44 +0000 (16:20 +0100)]
Add label names as filter in issue search api (#5946)

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 4 Feb 2019 00:59:52 +0000 (00:59 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoIssue 5924 fix compare button (#5929)
zeripath [Mon, 4 Feb 2019 00:56:18 +0000 (00:56 +0000)]
Issue 5924 fix compare button (#5929)

* Revert #5877

This unfortunately was not the solution.

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Change permission check to create pull requests to CanReadIssuesOrPulls

Signed-off-by: Andrew Thornton <art27@cantab.net>
5 years agoFix ssh deploy and user key constraints (#1357) (#5939)
zeripath [Sun, 3 Feb 2019 23:56:53 +0000 (23:56 +0000)]
Fix ssh deploy and user key constraints (#1357) (#5939)

1. A key can either be an ssh user key or a deploy key. It cannot be both.
2. If a key is a user key - it can only be associated with one user.
3. If a key is a deploy key - it can be used in multiple repositories and the permissions it has on those repositories can be different.
4. If a repository is deleted, its deploy keys must be deleted too.

We currently don't enforce any of this and multiple repositories access with different permissions doesn't work at all. This PR enforces the following constraints:

- [x] You should not be able to add the same user key as another user
- [x] You should not be able to add a ssh user key which is being used as a deploy key
- [x] You should not be able to add a ssh deploy key which is being used as a user key
- [x] If you add an ssh deploy key to another repository you should be able to use it in different modes without losing the ability to use it in the other mode.
- [x] If you delete a repository you must delete all its deploy keys.

Fix #1357

5 years agoshow user who created the repository instead of the organization in action feed ...
Lanre Adelowo [Sun, 3 Feb 2019 23:21:08 +0000 (00:21 +0100)]
show user who created the repository instead of the organization in action feed (#5948)

5 years agohandle milestone events for issues and PR (#5947)
Lanre Adelowo [Sun, 3 Feb 2019 18:31:58 +0000 (19:31 +0100)]
handle milestone events for issues and PR (#5947)

5 years agoFix notifications on pushing with deploy keys by setting hook environment variables...
zeripath [Sun, 3 Feb 2019 14:00:48 +0000 (14:00 +0000)]
Fix notifications on pushing with deploy keys by setting hook environment variables (#5935)

The gitea prerecieve and postrecieve hooks and the gitea PushUpdate function require that the PusherID and PusherName are real users. Previously, these environment variables were not being set when using a deploy key - the main result being that pushing to empty repositories meant that is_empty status was not changed.

I've also added an integration test to ensure that the is_empty status is updated on pushing with a deploy key.

There is a slight issue in that the deploy key is now considered a proxy for the owner - we don't have a way of separating out the deploy key from the owner at present. This can be fixed in another PR.

Fix #3795

Signed-off-by: Andrew Thornton art27@cantab.net
5 years agoFix #5866: Silence console logger in gitea serv (#5887)
zeripath [Sun, 3 Feb 2019 11:19:28 +0000 (11:19 +0000)]
Fix #5866: Silence console logger in gitea serv  (#5887)

By default, if `setting.NewContext()` prints out any warning logs, these are printed to the stdout breaking `git receive-pack` etc. meaning that even if there is a warning because of a minor problem in your app.ini but gitea starts despite this - you **CANNOT** push or pull over SSH.

This PR disables the console logger whilst in `serv.go`

Signed-off-by: Andrew Thornton <art27@cantab.net>
5 years agoRemove all CommitStatus when a repo is deleted (#5940)
John Olheiser [Sun, 3 Feb 2019 04:03:45 +0000 (22:03 -0600)]
Remove all CommitStatus when a repo is deleted (#5940)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years agoAdd single commit API support (#5843)
Lunny Xiao [Sun, 3 Feb 2019 03:35:17 +0000 (11:35 +0800)]
Add single commit API support (#5843)

* add single commit API support

5 years agoMake log mailer for testing (#5893)
zeripath [Sun, 3 Feb 2019 02:06:52 +0000 (02:06 +0000)]
Make log mailer for testing (#5893)

* Create log mailer for testing email settings

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Switch on the log mailer for the integration tests

This ensures that the sending mail process works

Signed-off-by: Andrew Thornton <art27@cantab.net>
* rename the from user for mysql/mssql

* rename log sender to dummy sender

* update the integration tests

5 years agofix log output (#5938)
Sergey Romanov [Sat, 2 Feb 2019 21:56:15 +0000 (02:56 +0500)]
fix log output (#5938)

5 years agoFix wrapping long code lines in UI (#5927)
silverwind [Sat, 2 Feb 2019 16:58:28 +0000 (17:58 +0100)]
Fix wrapping long code lines in UI (#5927)

Wrapping was initially added in https://github.com/go-gitea/gitea/pull/2789
but it is currently disabled because the rule that applies wrapping to
the wrap class did not have enough CSS specificity.

Resolved the issue by using a general selector that matches all code
boxes. The previous wrap class was removed because it had only been
inconsistenly applied to various code boxes and because I found no easy
way to add classes to code boxes rendered in Markdown.

Also removed a seemingly useless :before on code view and added padding
to restore the spacing.

5 years agoUI: Better support for long repo names (#5932)
silverwind [Sat, 2 Feb 2019 12:44:33 +0000 (13:44 +0100)]
UI: Better support for long repo names (#5932)

* UI: Make long repo names wrap less often

* also adjust news feed column widths

5 years agosupport reviewing on a deleted file path (#5880)
Lanre Adelowo [Fri, 1 Feb 2019 01:37:20 +0000 (02:37 +0100)]
support reviewing on a deleted file path (#5880)

5 years ago1.7.1 changelog (#5919)
techknowlogick [Thu, 31 Jan 2019 16:42:22 +0000 (11:42 -0500)]
1.7.1 changelog (#5919)

5 years agoDisable redirect for i18n (#5910)
techknowlogick [Thu, 31 Jan 2019 14:38:20 +0000 (09:38 -0500)]
Disable redirect for i18n (#5910)

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 31 Jan 2019 13:39:54 +0000 (13:39 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoFix bug when read public repo lfs file (#5912)
Lunny Xiao [Thu, 31 Jan 2019 13:36:57 +0000 (21:36 +0800)]
Fix bug when read public repo lfs file (#5912)

* fix bug when read public repo lfs file

* add comment on lfs permission check

5 years agoRecover panic in orgmode.Render if bad orgfile (#4982) (#5903)
zeripath [Wed, 30 Jan 2019 22:17:43 +0000 (22:17 +0000)]
Recover panic in orgmode.Render if bad orgfile (#4982) (#5903)

This PR protects against the panic referred to in chaseadmsio/goorgeous#82
by recovering from the panic and just returning the raw bytes if
there is an error.

Signed-off-by: Andrew Thornton <art27@cantab.net>
5 years agoProvide better panic handling (#5902)
zeripath [Wed, 30 Jan 2019 22:00:00 +0000 (22:00 +0000)]
Provide better panic handling (#5902)

This PR gitea'ises the macaron.Recovery() handler meaning that in
the event of panic we get proper gitea 500 pages and the stacktrace
is logged with the gitea logger.

Signed-off-by: Andrew Thornton <art27@cantab.net>
5 years agoOnly allow local login if password is non-empty (#5906)
zeripath [Wed, 30 Jan 2019 21:18:54 +0000 (21:18 +0000)]
Only allow local login if password is non-empty (#5906)

5 years agoFix go-get URL generation (#5905)
Lauris BH [Wed, 30 Jan 2019 21:04:19 +0000 (23:04 +0200)]
Fix go-get URL generation (#5905)

5 years agodon't allow pull requests to be created on an archived repository (#5883)
Lanre Adelowo [Wed, 30 Jan 2019 17:20:40 +0000 (18:20 +0100)]
don't allow pull requests to be created on an archived repository (#5883)

* don't allow pull requests to be created on an archived repository
Also disable the "PR" button if the repo is archived

* Refuse creating an issue/PR via API calls too

5 years agoDon't discard the value of DISABLE_REGULAR_ORG_CREATION (#5886)
Lanre Adelowo [Wed, 30 Jan 2019 17:04:14 +0000 (18:04 +0100)]
Don't discard the value of DISABLE_REGULAR_ORG_CREATION (#5886)

* Consider the configuration value of DISABLE_REGULAR_ORG_CREATION when
creating a user

5 years agorespect value of REQUIRE_SIGNIN_VIEW (#5901)
Lanre Adelowo [Wed, 30 Jan 2019 16:45:48 +0000 (17:45 +0100)]
respect value of REQUIRE_SIGNIN_VIEW (#5901)

5 years agoFix new release creation API to allow empty target (#5870)
Lauris BH [Wed, 30 Jan 2019 16:33:00 +0000 (18:33 +0200)]
Fix new release creation API to allow empty target (#5870)

* Fix new release creation API to allow empty target

* Add more test cases

* Update swagger

5 years agoif repo does not exist, show a 404 not a 500 (#5900)
Lanre Adelowo [Wed, 30 Jan 2019 16:13:39 +0000 (17:13 +0100)]
if repo does not exist, show a 404 not a 500 (#5900)

5 years agoUI: Correct footer height if screen-width is to small (fixes #5878) (#5889) (#5889)
EpicCoder [Wed, 30 Jan 2019 00:45:08 +0000 (01:45 +0100)]
UI: Correct footer height if screen-width is to small (fixes #5878) (#5889) (#5889)

5 years agofix compare button on upstream repo leading to 404 (#5877)
Lanre Adelowo [Tue, 29 Jan 2019 23:49:07 +0000 (00:49 +0100)]
fix compare button on upstream repo leading to 404 (#5877)

5 years agoUI: Change GPG Validation colors and remove inline CSS; fixes #5404 (#5896)
EpicCoder [Tue, 29 Jan 2019 23:11:53 +0000 (00:11 +0100)]
UI: Change GPG Validation colors and remove inline CSS; fixes #5404 (#5896)