2
0
Commit Graph

6906 Commits

Author SHA1 Message Date
Jonas Franz
8a25f556ec Fix makefile generate buildstep (#5556)
Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-12-17 15:05:49 +01:00
Lunny Xiao
1f516ee2bc Improve performance of dashboard (#4977) 2018-12-13 10:55:43 -05:00
GiteaBot
b1491a0fda [skip ci] Updated translations via Crowdin 2018-12-12 21:02:34 +00:00
Greg Karékinian
83a525ea79 Remove a double slash in the HTTPS redirection when Let's Encrypt is enabled (#5537)
Before:

$ curl 0.0.0.0:3001
<a href="https://gitea.example.com:3000//">Found</a>.

After:

$ curl 0.0.0.0:3001
<a href="https://gitea.example.com:3000/">Found</a>.

Fixes #5536
2018-12-12 23:00:24 +02:00
GiteaBot
8753c5e6b0 [skip ci] Updated translations via Crowdin 2018-12-12 15:19:11 +00:00
Lunny Xiao
894a8f036c fix bug when a read perm user to edit his issue (#5516) 2018-12-12 10:17:25 -05:00
Lunny Xiao
892b560374 fix detect force push failure on deletion of protected branches (#5522) 2018-12-12 10:46:17 +02:00
kolaente
b51d613867 Added test environment for mssql (#4282)
* Added test environment for m$sql

* Added template for test environment for m$sql

* Fix password

* Fix password (again)

* Fix password (again again)

* Fix db

* Ci trigger (Looking at you drone....)

* Ci trigger (Looking at you drone....)

* Ci trigger (Looking at you drone....)

* Ci trigger (Looking at you drone....)

* Create master database for mssql integration tests

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Create database only if master do not exist

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fix mssql integration tests by using custom database "gitea"

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Moved defer

* bump xorm

* updated xorm

* Fixed build
2018-12-12 09:01:41 +08:00
Lunny Xiao
9c2923f68d fix approvals limitation (#5521) 2018-12-11 18:49:33 -05:00
Lunny Xiao
accc2e1770 fix permission check on api create org (#5523) 2018-12-11 14:33:24 -05:00
Lunny Xiao
2f59e802d1 fix clone wiki failed via ssh (#5503) 2018-12-11 13:37:32 -05:00
Lunny Xiao
eb34825106 fix adding reaction fail for read permission (#5515) 2018-12-11 13:12:06 -05:00
Lunny Xiao
d613d6bc80 add git protocol v2 support via SSH on Docker image (#5520)
* add git protocol v2 support via SSH on Docker image

* remove new layer on dockerfile
2018-12-11 12:20:04 -05:00
Greg Karékinian
dd7684180c Fix the Let's Encrypt handler by listening on a valid address (#5525)
* Fix the Let's Encrypt handler by listening on a valid address

Also handle errors in the HTTP server go routine, return a fatal error
when something goes wrong.

Thanks to @gbl08ma for finding the actual bug

Here is an example of the error handling:

    2018/12/11 14:23:07 [....io/gitea/cmd/web.go:87 func1()] [E] Failed to
    start the Let's Encrypt handler on port 30: listen tcp 0.0.0.0:30: bind:
    permission denied

Closes #5280

* Fix a typo
2018-12-11 10:46:12 -05:00
Jonas Franz
8aeeea6370 Approvals at Branch Protection (#5350)
* Add branch protection for approvals

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add required approvals

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add missing comments and fmt

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add type = approval and group by reviewer_id to review

* Prevent users from adding negative review limits

* Add migration for approval whitelists

Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-12-11 19:28:37 +08:00
Christopher
a10347c060 Fixing MSSQL timestamp type (#5511)
MSSQL is using the wrong type here which results in a strconv.ParseInt: parsing "2018-12-07T00:00:00Z": invalid syntax error.
The added datediff(SECOND, '19700101', x) results in the unix timestamp to be returned.

Signed-off-by: Christopher Dziomba <christopher.dziomba@gmail.com>
2018-12-11 10:05:24 +08:00
GiteaBot
31f31e57d2 [skip ci] Updated translations via Crowdin 2018-12-11 01:12:24 +00:00
Lunny Xiao
53dad4d7f6 fix code review on mssql (#5502) 2018-12-11 09:09:46 +08:00
GiteaBot
3dbf82dfc8 [skip ci] Updated translations via Crowdin 2018-12-10 20:03:39 +00:00
Lunny Xiao
4a91c66b2d fix forgot deletion of notification when delete repository (#5506) 2018-12-10 22:01:01 +02:00
Lunny Xiao
25979b1e66 Fix empty wiki (#5504)
* fix wiki page when wiki path is exist but empty

* improve the error check
2018-12-09 17:45:44 -05:00
techknowlogick
ce82819a8a backport 1.6.1 changelog (#5507) 2018-12-09 23:33:13 +02:00
Lunny Xiao
01e6eba179 Improve team members and repositories settings UI (#5457)
* improve team members and repositories settings UI

* use tab on team pages

* add default description on team members and repos

* add blank on numbers and texts

* improve translation
2018-12-09 08:42:11 +02:00
Lunny Xiao
5e28128ef2 add tests for api user orgs (#5494)
* add tests for api user orgs

* add permission for admin to list user's orgs even he is a private user of org
2018-12-09 10:19:50 +08:00
Lunny Xiao
27b4e21692 fix topic name length on database (#5493) 2018-12-08 14:27:30 +02:00
koyu
ef05c7b359 Allow link verification for services like Mastodon (#5481) 2018-12-06 22:15:48 +02:00
GiteaBot
8ae071f1ac [skip ci] Updated translations via Crowdin 2018-12-04 22:42:54 +00:00
Roman
4b836c6391 improve the git-scm url's in docs and sample.ini (#5467)
* remove old git-version from git-scm url in app.ini

The url includes the version of git, which is not required to view the
page. If you open the page without the version you get the current
version and it's possible to switch the used version.

Signed-off-by: Roman <romaaan.git@gmail.com>

* docs: mention the git-scm url for git configs

Signed-off-by: Roman <romaaan.git@gmail.com>
2018-12-05 00:40:42 +02:00
Bo-Yi Wu
7caaeab7e5 refactor: replace lint to revive (#5422)
* refactor: replace lint to revive

* make changes.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2018-12-03 09:28:46 -05:00
romankl
76f3476629 ensure that the closed_at is set for closed (#5449)
right now the `closed_at` field for json responses is not filled during
the `APIIssue` creation for api responses.

For a closed issue you get a result like:
```json
"state":"open","comments":0,"created_at":"2018-11-29T16:39:24+01:00",
"updated_at":"2018-11-30T10:49:19+01:00","closed_at":null,
"due_date":null,"pull_request":null}
```
which has no information about the closing date. (which exists in the
db and ui)
with this PR the result changes to this:

```json
:null,"assignee":null,"assignees":null,
"state":"closed",
"comments":0,"created_at":"2018-11-29T16:43:05+01:00",
"updated_at":"2018-12-02T19:17:05+01:00",
"closed_at":"2018-12-02T19:17:05+01:00",
"due_date":null,"pull_request":null}
```

fixes: https://github.com/go-gitea/gitea/issues/5446
Signed-off-by: Roman <romaaan.git@gmail.com>
2018-12-02 15:43:01 -05:00
GiteaBot
58ad7e9070 [skip ci] Updated translations via Crowdin 2018-12-02 16:10:08 +00:00
Lanre Adelowo
6c0f1293de admin should be able to delete repos even if he is not a member of the organization (#5443) 2018-12-02 11:08:33 -05:00
GiteaBot
a145fef298 [skip ci] Updated translations via Crowdin 2018-12-01 06:07:46 +00:00
Lucien Kerl
47e43d2379 Removing Labels via EditPullRequest API (#5348)
* added the ability to provide an empty array at the EditPullRequests API to remove all labels

Signed-off-by: Lucien Kerl <lucien.kerl@wuerth-it.com>

* Update pull.go
2018-12-01 01:05:57 -05:00
romankl
59fb2eebae word-break the WebHook url to prevent a ui-break (#5432)
right now, the url is displayed with an anchor tag with no classes. If
the url is really really long, the url will break out of the containing
div and (depending on the url length) the browser shows the horizontal
scrollbar.
This pr makes use of the already existing css class `dont-break-out`
which gives all the anchor the necessary properties to prevent the
break.
Another solution could be to introduce some classes like
`text text-break-word`, but that would duplicate the `dont-break-out`
class just for text elements that use the `text` class.

fixes: https://github.com/go-gitea/gitea/issues/5416
Signed-off-by: Roman <romaaan.git@gmail.com>
2018-11-30 09:52:05 -05:00
GiteaBot
7690c62492 [skip ci] Updated translations via Crowdin 2018-11-30 13:01:54 +00:00
Lunny Xiao
78eb28c13f Fix repository deletion when there is large number of issues in it (#5426) 2018-11-30 14:59:12 +02:00
GiteaBot
7e2b2a0e86 [skip ci] Updated translations via Crowdin 2018-11-30 08:51:59 +00:00
Lanre Adelowo
4ae61b15a8 Allow to add organization members as collaborators on organization owned repositories (#4748)
repository... Fixes #4507
2018-11-30 10:49:55 +02:00
GiteaBot
1e85d2cc75 [skip ci] Updated translations via Crowdin 2018-11-29 16:49:36 +00:00
romankl
90257d02cc Remove the required class from optional ssh port in installation page (#5428)
the ssh port is optional during the installation process. The
translations even mention that it is optional and can be blank. Right
now it has the `required` class which creates the red `*` behind the
field caption - used for required fields.
If you leave it blank, the SSH option is disabled
(not touched by this PR)

Signed-off-by: Roman <romaaan.git@gmail.com>
2018-11-29 18:47:57 +02:00
techknowlogick
5400552678 Upgrade alpine to 3.8 (#5423) 2018-11-28 21:33:35 -05:00
Lunny Xiao
a8067cdcfc Milestone issues and pull requests (#5293)
* add milestone issues and pulls page instead of redirecting issues page

* add milestone when creating issue from milestone page

* refactor to merge similiar codes as a new function issues

* remove milestone info on milestone issues list

* fix missing params
2018-11-29 09:46:30 +08:00
Kasi Reddy
c5779ba9bf Git-Trees API (#5403)
* Git-Trees API

* update vendor'd libs

* added comments to exported function and formatted.

* make fmt

* update per @lafirks feedback
2018-11-28 16:17:09 -05:00
Lauris BH
274d803245 Fix heatmap colors for Chrome/Safari (#5421) 2018-11-28 18:22:46 +02:00
Lunny Xiao
3c821fb91a Restrict permission check on repositories and fix some problems (#5314)
* fix units permission problems

* fix some bugs and merge LoadUnits to repoAssignment

* refactor permission struct and add some copyright heads

* remove unused codes

* fix routes units check

* improve permission check

* add unit tests for permission

* fix typo

* fix tests

* fix some routes

* fix api permission check

* improve permission check

* fix some permission check

* fix tests

* fix tests

* improve some permission check

* fix some permission check

* refactor AccessLevel

* fix bug

* fix tests

* fix tests

* fix tests

* fix AccessLevel

* rename CanAccess

* fix tests

* fix comment

* fix bug

* add missing unit for test repos

* fix bug

* rename some functions

* fix routes check
2018-11-28 19:26:14 +08:00
Michael Kuhn
b6c178b443 Explicitly disable Git credential helper (#5367)
* Explicitly disable Git credential helper

If the user running Gitea has configured a credential helper, Git
credentials might leak out of Gitea.

There are two problems with credential helpers when combined with Gitea:

1. Credentials entered by a user when doing a migration or setting up a
   mirror will end up in the credential store. In the worst case, this
   is the plain text file ~/.git-credentials.
2. Credentials in the credential store will be used for migrations and
   mirrors by all users. For example, if user A sets up a mirror, their
   credentials will be stored. If user B later sets up a mirror from the
   same host and does not enter any credentials, user A's credentials
   will be used.

This PR prepends -c credential.helper= to all Git commands to clear the
list of helpers. This requires at least Git version 2.9, as previous
versions will try to load an empty helper instead. For more details, see
24321375cd

* Update git module
2018-11-28 09:00:25 +02:00
Lauris BH
4d8d683999 Implement git refs API for listing references (branches, tags and other) (#5354)
* Inital routes to git refs api

* Git refs API implementation

* Update swagger

* Fix copyright

* Make swagger happy add basic test

* Fix test

* Fix test again :)
2018-11-27 16:52:20 -05:00
SohnyBohny
49c5201f41 Create Progressive Web App (#4730)
* Create manifest and serviceworker

* Create templates and add AppSubUrl

* Add JSRenderer

* fix ctx type

* Add JSRenderer to static.go

* Complete adding {{AppSubUrl}}

* Add more fonts to urlsToCache

* Add 512px and 192px icons

* Hardcode font MD5

* Default theme doesn't have a specific CSS file
2018-11-27 10:18:26 -05:00
Lauris BH
e61c080183 Refactor heatmap to vue component (#5401) 2018-11-27 10:36:54 +01:00