2
0
Commit Graph

7097 Commits

Author SHA1 Message Date
techknowlogick
b82dd52f26 add other session providers (#5963) 2019-02-05 11:52:51 -05:00
Lunny Xiao
2e9bdfcb89 Pull request conflict files detection (#5951)
* add conflict detection

* test pull request conflict files

* fix detection files number

* fix comments
2019-02-05 06:54:49 -05:00
GiteaBot
4a9e9444b8 [skip ci] Updated translations via Crowdin 2019-02-05 11:40:36 +00:00
Lanre Adelowo
455ba5e5d0 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
2019-02-05 13:38:11 +02:00
GiteaBot
d6d5dc4986 [skip ci] Updated translations via Crowdin 2019-02-04 15:23:15 +00:00
Lanre Adelowo
6b2f301238 Add label names as filter in issue search api (#5946) 2019-02-04 10:20:44 -05:00
GiteaBot
4cc9d07aa9 [skip ci] Updated translations via Crowdin 2019-02-04 00:59:52 +00:00
zeripath
0ad2084a0f 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>
2019-02-03 19:56:18 -05:00
zeripath
396b45f25c 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
2019-02-03 23:56:53 +00:00
Lanre Adelowo
c3a6f4a5af show user who created the repository instead of the organization in action feed (#5948) 2019-02-04 01:21:08 +02:00
Lanre Adelowo
888a83fca8 handle milestone events for issues and PR (#5947) 2019-02-03 13:31:58 -05:00
zeripath
64fa0377a6 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
2019-02-03 14:00:48 +00:00
zeripath
6f9f4f4a2a 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>
2019-02-03 11:19:28 +00:00
John Olheiser
7e0f977b29 Remove all CommitStatus when a repo is deleted (#5940)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-02-02 23:03:45 -05:00
Lunny Xiao
67c99c9f66 Add single commit API support (#5843)
* add single commit API support
2019-02-02 22:35:17 -05:00
zeripath
6e0309a8fb 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
2019-02-02 21:06:52 -05:00
Sergey Romanov
b66d31e09b fix log output (#5938) 2019-02-02 21:56:15 +00:00
silverwind
bcf09f092a 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.
2019-02-02 16:58:28 +00:00
silverwind
fd16441763 UI: Better support for long repo names (#5932)
* UI: Make long repo names wrap less often

* also adjust news feed column widths
2019-02-02 14:44:33 +02:00
Lanre Adelowo
b1ceecf33e support reviewing on a deleted file path (#5880) 2019-02-01 09:37:20 +08:00
techknowlogick
4a63ddecb9 1.7.1 changelog (#5919) 2019-01-31 11:42:22 -05:00
techknowlogick
cf12c7f3ed Disable redirect for i18n (#5910) 2019-01-31 09:38:20 -05:00
GiteaBot
19f3bb4a29 [skip ci] Updated translations via Crowdin 2019-01-31 13:39:54 +00:00
Lunny Xiao
acc9177ac9 Fix bug when read public repo lfs file (#5912)
* fix bug when read public repo lfs file

* add comment on lfs permission check
2019-01-31 13:36:57 +00:00
zeripath
a4f79591e6 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>
2019-01-30 17:17:43 -05:00
zeripath
57b2d3d023 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>
2019-01-30 17:00:00 -05:00
zeripath
450171933c Only allow local login if password is non-empty (#5906) 2019-01-30 23:18:54 +02:00
Lauris BH
056478955e Fix go-get URL generation (#5905) 2019-01-30 21:04:19 +00:00
Lanre Adelowo
e42b3bdd19 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
2019-01-30 12:20:40 -05:00
Lanre Adelowo
f25e696300 Don't discard the value of DISABLE_REGULAR_ORG_CREATION (#5886)
* Consider the configuration value of DISABLE_REGULAR_ORG_CREATION when
creating a user
2019-01-30 12:04:14 -05:00
Lanre Adelowo
0fdeafe8cc respect value of REQUIRE_SIGNIN_VIEW (#5901) 2019-01-30 11:45:48 -05:00
Lauris BH
eb23a60775 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
2019-01-30 11:33:00 -05:00
Lanre Adelowo
cb016fb93a if repo does not exist, show a 404 not a 500 (#5900) 2019-01-30 11:13:39 -05:00
EpicCoder
f4ac83cbb0 UI: Correct footer height if screen-width is to small (fixes #5878) (#5889) (#5889) 2019-01-29 19:45:08 -05:00
Lanre Adelowo
851c559311 fix compare button on upstream repo leading to 404 (#5877) 2019-01-29 18:49:07 -05:00
EpicCoder
cd69579840 UI: Change GPG Validation colors and remove inline CSS; fixes #5404 (#5896) 2019-01-29 18:11:53 -05:00
zeripath
17cdf95691 Also ensure the repo is loaded (#5895)
Signed-off-by: Andrew Thornton <art27@cantab.net>
2019-01-29 22:43:40 +00:00
GiteaBot
8d1a7abe1a [skip ci] Updated translations via Crowdin 2019-01-29 21:28:45 +00:00
zeripath
6b8e788bef Ensure issue.Poster is loaded in mailIssueCommentToParticipants (#5891)
Previous code could potentially dereference nil - this PR ensures
that the poster is loaded before dereferencing it.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2019-01-29 16:26:17 -05:00
zeripath
a3e9817db8 Add migration test (#5773)
* Add migration test

This commit adds a simple migration test for v1.5.3, v1.6.4 and v1.7.0-rc3

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

* Automigrate based on available dbs

* remove old ini file

* Standardise the dialect names
2019-01-28 11:18:52 -05:00
GiteaBot
f5908ba482 [skip ci] Updated translations via Crowdin 2019-01-28 15:55:40 +00:00
vee w
9308319d93 Fix wrong URL to download link. (#5881)
* Fix wrong URL to download link.

The link does not contain trailing slash and cause error page displayed.

* Update version
2019-01-28 10:53:16 -05:00
kekero
32d4f521c3 New Issue ?body= query (#5851)
* New Issue ?body= query

* Override issue template with body query

* Add documentation for issue body query
2019-01-28 10:23:59 -05:00
Lanre Adelowo
fefa5b5887 Fix "pulls.blocked_by_approvals" text (#5879) 2019-01-28 10:05:20 -05:00
GiteaBot
25396ad679 [skip ci] Updated translations via Crowdin 2019-01-28 14:16:11 +00:00
zeripath
ce55d7cf80 API: Fix null pointer in attempt to Sudo if not logged in (#5872)
Signed-off-by: Andrew Thornton <art27@cantab.net>
2019-01-28 14:13:59 +00:00
Gabriel Silva Simões
31984332ab Revert #3711 overwrite of only show "No Description" to repo admins #2167 (#5836)
Revert #3711 overwrite of only show "No Description" to repo admins  #2167 and add tests to prevent accidental overwrite again.
2019-01-27 21:13:15 +00:00
zeripath
78d440dbf5 Fix wording of #5858 issue.review.reject string (#5869)
As per @lafriks comment this should be: requested changes

Signed-off-by: Andrew Thornton <art27@cantab.net>
2019-01-27 19:39:49 +02:00
GiteaBot
0dd4338c58 [skip ci] Updated translations via Crowdin 2019-01-27 11:31:56 +00:00
Harshit Bansal
14ded78889 Fix an error while adding a dependency via UI. (#5862)
Fixes: #5783
2019-01-27 13:31:40 +02:00