Commit Graph

9722 Commits

Author SHA1 Message Date
John Olheiser 0ba610011b
Change install description (#11395)
Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-05-13 12:08:44 +03:00
GiteaBot 2f9e6cae48 [skip ci] Updated translations via Crowdin 2020-05-13 07:52:13 +00:00
zeripath 8d212f778c
Revert "Avoid 0 new commits messages to be send (#11082)" (#11397)
This reverts commit 6034f8bcaa.
2020-05-13 10:50:56 +03:00
Cirno the Strongest e9dc3bcb79
Add missing card component to semantic.json (#11394)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-05-13 09:43:06 +08:00
6543 7257c39ddf
Refactor Milestone related (#11225) 2020-05-12 22:54:35 +01:00
zeripath ba40263fdd
Unfortunately go template if does not shortcut (#11392)
Go template's `{{if ...}}` does not shortcut its tests therefore it is
possible to cause a NPE unless you separate ifs into two.

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

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-05-12 17:01:27 -04:00
zeripath aa29f1c2b9
Ensure search action button coalesced to adjacent input (#11385)
Fomantic-ui's action button syntax requires that the button is
the next sibling of the input it is attached to and that they
are both children of a div.action.

Fix #11375

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

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-05-12 15:08:43 -04:00
赵智超 b00e62c12b
ui: Replenish the missing ‘PageIsSignUp’ in sign up view (#11390)
Signed-off-by: a1012112796 <1012112796@qq.com>
2020-05-12 19:01:15 +01:00
techknowlogick 08611fb765
Update docs to reflect new location of homebrew repo (#11384)
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>
2020-05-12 20:51:41 +08:00
zeripath 0198bbedc1
Allow compare page to look up base, head, own-fork, forkbase-of-head (#11327)
* Allow compare page to look up base, head, own-fork, forkbase-of-head

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

* as per @guillep2k

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

* Update routers/repo/compare.go

* as per @guillep2k

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

* Rationalise the names a little

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

* Rationalise the names a little (2)

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

* Fix 500 with fork of fork

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

* Prevent 500 on compare different trees

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

* dotdotdot is perfectly valid in both usernames and repo names

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

* ensure we can set the head and base repos too

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

* ensure we can set the head and base repos too (2)

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

* fix lint

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

* only set headRepo == baseRepo if isSameRepo

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-05-12 08:52:46 +03:00
Cirno the Strongest a4c7ad99e5
Fix usage of removed jqXHR.success (#11379)
Introduced by b57a735 via removal of jQuery-Migrate.

This PR changes usage of .success on jqXHR to .done.

Fixes #11228 and few other places, such as removal of code comments.
2020-05-12 04:34:48 +01:00
GiteaBot 6a02a4f57a [skip ci] Updated translations via Crowdin 2020-05-11 22:05:16 +00:00
zeripath c42c31a111
Correctly set the organization num repos (#11339)
* Correctly set the organization num repos

Correctly set the organization num repos to the number of
accessible repos for the user

Fix #11194

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

* as per @lunny

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

* attempt to fix mssql

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

* Update models/user.go

* Explicit columns

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

* Add test and fix 0 counted orgs

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

* remove orgname from api

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-05-12 01:04:08 +03:00
GiteaBot 45968b9f44 [skip ci] Updated translations via Crowdin 2020-05-11 09:45:39 +00:00
Cirno the Strongest 32b8172e56
Consolidate API for getting single commit (#11368)
* Allow Git ref for /repos/{owner}/{repo}/git/commits/{sha}

* Consolidate API for getting single commit

* Fix tests and do it differently

Co-authored-by: zeripath <art27@cantab.net>
2020-05-11 12:44:36 +03:00
GiteaBot 59b9b77a0d [skip ci] Updated translations via Crowdin 2020-05-11 08:39:13 +00:00
burbon d8e6acda8c
Support Range header end in lfs (#11314)
* Initial support of end Range header option in lfs

* Allow end range option to be unspecified

* Declare toByte for consistency

* Factor out content encoding tests from doLfs

This is so Range tests could still use doLfs but without repeating
not related tests

* Add Range header test

* implemented extraHeader
* parametrized expectedStatus

* Add more test cases of Range header

* Fix S1030: should use resp.Body.String()

* Add more tests for edge cases

* Fix tests

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

Co-authored-by: zeripath <art27@cantab.net>
2020-05-11 11:37:59 +03:00
zeripath 742e26f5a5
Prevent 500 with badly formed task list (#11328)
Fix #11317

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-05-11 00:14:49 +01:00
Cirno the Strongest c9187b8116
Add gnupg to Dockerfile (#11365)
Co-authored-by: zeripath <art27@cantab.net>
2020-05-10 23:41:34 +03:00
6543 6e23a1b843
[Vendor] mssqldb: 2019-11-28 -> 2020-04-28 (#11364)
update go-mssqldb 2019-11-28 (1d7a30a10f73) -> 2020-04-28 (06a60b6afbbc)
2020-05-10 18:42:52 +01:00
Leo da5e3fa299
Changed image of openid-connect logo for better look on arc-green theme (#11312)
* Set background of openIDConnect logo to white in arc-green theme

* Fixed linting off arc-green theme

Signed-off-by: Leo Maroni <git@em0lar.de>

* Revert changes of first commit (white background) and replaced the image

* Updated openid_connect (part 2)

* Update public/img/auth/openid_connect.svg

Now in one line

Co-authored-by: silverwind <me@silverwind.io>

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-05-10 17:55:22 +03:00
zeripath f8e015e8e4
Move LFS directory creation out of NewContext (#11362)
Fix #9481
(probably others too)

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

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-05-10 16:30:46 +03:00
6543 43bb85908d
Update github.com/pquerna/otp from untagged to v1.2.0 (#11358) 2020-05-10 15:50:16 +03:00
6543 57b6f83191
Update github.com/issue9/identicon from untagged to v1.0.1 (#11359)
Co-authored-by: zeripath <art27@cantab.net>
2020-05-10 06:23:17 -04:00
6543 dbb74978f7
github.com/yohcop/openid-go update to first tagged version (#11357) 2020-05-10 09:53:04 +01:00
6543 fdf750e4d4
[Vendor] blevesearch v0.8.1 -> v1.0.7 (#11360)
* Update blevesearch v0.8.1 -> v1.0.7

* make vendor

Co-authored-by: zeripath <art27@cantab.net>
2020-05-10 06:40:54 +01:00
silverwind a44854c287
Few tweaks in the hacking guide (#11345)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-05-09 18:11:30 -04:00
6543 18f4aaee64
Frontport Changelog for v1.11.5 (#11356)
* Changelog v1.11.5 (#11329)

* Changelog v1.11.5

* Apply suggestions from code review

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Update Changelog for 1.11.5 (#11347)

* Update Changelog for 1.11.5

* bumb version in docs

* Update CHANGELOG.md

Co-authored-by: zeripath <art27@cantab.net>

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-05-09 16:24:46 -04:00
6543 cd4f7ba5bf
Fix tracked time issues (#11349)
* Fix nil exeption: #11313

* fix 500

* activate test 😆

* move logic
2020-05-09 11:18:44 -03:00
Alan Pope b9df5da1f4
Limit snap build architectures (#11346)
Builds will fail on s390x, i386 and ppc64el because we depend on nodejs, which is only published for armhf, arm64 and amd64. This change merely tells the snap build farm to not waste time trying to build on architectures will will guarantee failure. Apologies for overlooking this in our previous PR.

Example build failures can be seen at [i386](https://launchpad.net/~build.snapcraft.io/+snap/53d5570c233b8b3663242f8d94dc21ad/+build/945935), [ppc64el](https://launchpad.net/~build.snapcraft.io/+snap/53d5570c233b8b3663242f8d94dc21ad/+build/945939), [s390x](https://launchpad.net/~build.snapcraft.io/+snap/53d5570c233b8b3663242f8d94dc21ad/+build/945940)
2020-05-09 12:39:19 +08:00
Sergio Schvezov b09ec508c3
update snapcraft.yaml for core18 and latest features (#11300)
Removing some of the complexity, together with the install and
configure hook.

Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
2020-05-08 21:21:28 +01:00
赵智超 119173130a
Add default CommitID for create pull review api (#11334)
If user create pull review through api but not set CommitID,
I think it's necessary to use last headCommitID as default seting,
or this review will be considered as stale review which is wrong

Signed-off-by: a1012112796 <1012112796@qq.com>
2020-05-08 19:50:23 +01:00
zeripath c58bc4bf80
Prevent timer leaks in Workerpool and others (#11333)
There is a potential memory leak in `Workerpool` due to the intricacies of
`time.Timer` stopping.

Whenever a `time.Timer` is `Stop`ped its channel must be cleared using a
`select` if the result of the `Stop()` is `false`.

Unfortunately in `Workerpool` these were checked the wrong way round.

However, there were a few other places that were not being checked.

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

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-05-08 16:46:05 +01:00
zeripath 6f6edb8fab
Add NotifySyncPushCommits to indexer notifier (#11309)
Thanks to @simon-on-gh for tracking down the issue.

Fix #11200

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-05-08 15:58:40 +01:00
L0veSunshine 866ce126ec
Split some words from template to improve translation. (#11221)
* split some words from template

* split some words from template

* add " " to mustache expression

* split some words from template

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-05-08 13:39:17 +01:00
zeripath 791353c03b
Add EventSource support (#11235)
If the browser supports EventSource switch to use this instead of
polling notifications.

Signed-off-by: Andrew Thornton art27@cantab.net
2020-05-07 22:49:00 +01:00
6543 486e4c8087
When deleting a tracked time through the API return 404 not 500 (#11319) 2020-05-07 18:54:33 +01:00
zeripath 71e73db2ff
Manage port in submodule refurl (#11305)
* Manage port in submodule refurl

Fix #11304

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

* fix lint

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

* URLJoin is causes a cyclic dependency and possibly isn't what what we want anyway

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

* Protect against leading .. in scp syntax

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

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-05-07 11:25:52 -03:00
6543 507d0ec57a
Prevent multiple listings of organization when creating a repository (#11303)
prevent double entries in results of GetOrgsCanCreateRepoByUserID

I first try to only add GroupBy directly but xorm return broken user objects ...

... solution was to just query related UserIDs(OrgIDs) first and return OrgUsers based on this IDs

close #11258

Co-authored-by: zeripath <art27@cantab.net>
2020-05-07 14:24:59 +01:00
GiteaBot a6b8de282c [skip ci] Updated translations via Crowdin 2020-05-07 06:48:52 +00:00
opyale b16534b0e4
Adding advanced label set. (#11298)
Add an advanced label set to contrib
2020-05-07 07:47:34 +01:00
6543 505e456f26
Protect default branch against deletion (#11115)
Although default branch is not offered for deletion in the templates, we need to prevent it both at the router level and in the pre-receive hook.

Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-05-06 12:08:45 +01:00
6543 a1f11a05e9
Load Repo Topics on blame view (#11307)
Fix #11280
2020-05-05 22:51:49 +01:00
zeripath d9de58beee
api.Context.NotFound(...) should tolerate nil (#11288)
There is an unfortunate signature change with the api.Context
NotFound function; whereas the normal modules/context/Context
NotFound function requires an error or nil, the api.Context
variant will panic with an NPE if a nil is provided.

This PR will allow api.Context.NotFound to tolerate a being
passed a nil.

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

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-05-05 21:52:13 +03:00
赵智超 0396fcf4b5
Change the style in admin notice content view from <p> to <pre> (#11301)
That's because many notic have more than one lines. So I think
pre is more better to used in here than p

Signed-off-by: a1012112796 <1012112796@qq.com>
2020-05-05 10:16:55 -05:00
silverwind a104864da2
Update JS dependencies (#11297)
Contains an apparently important bug fix for highlight.js [1],
otherwise nothing of interest.

[1] https://github.com/highlightjs/highlight.js/releases/tag/10.0.2

Co-authored-by: zeripath <art27@cantab.net>
2020-05-05 00:48:52 -03:00
Kyle Evans 38cd9ba47b
Allow unauthenticated users to compare (#11240)
* routers: make /compare route available to unauthenticated users

Remove some bits of the compare interface if the user isn't signed in.
Notably, they don't need to see the "New Pull Request" button box nor the
hidden form that would fail to submit due to the POST request continuing to
require proper privileges.

Follow-up commits will improve the UI a bit around this, removing some
"Pull Request" verbiage in favor of "Compare."

* ui: home: show "compare" button for unauthenticated users

This change requires pulling in the BaseRepo unconditionally and
recording if the pull request is in-fact not allowed
(.PullRequestCtx.Allowed). If the user isn't allowed to create a pull
request, either because this isn't a fork or same-fork branch PRs aren't
allowed, then we'll name the button "Compare" instead of "Pull Request."

* ui: branch list: use the new Compare language when available

When viewing the branch listing as an unauthenticated user, you'll get
"Pull Request" buttons. use the new "Compare" verbiage instead, which
matches GitHub behavior when you can't issue a pull request from the
branches.

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-05-04 19:44:30 -03:00
zeripath 680dfab2ee
Fix Create new branch (#11294)
Fix #11212

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-05-04 16:55:52 -04:00
Adrian POIGET 99082eebd7
Fix; declare DOMAIN variable for docker setup (#10780)
In the /install form, the value for SSH Server Domain is taken form the DOMAIN variable
and overwrites SSH_DOMAIN environment variable set the first time if nothing done

Co-authored-by: Adrian POIGET <adrian.poiget@viveris.fr>
2020-05-04 10:50:29 +01:00
guillep2k 64029e1468
Update lunny/levelqueue to 0.3.0 (#11285)
Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
2020-05-04 07:51:09 +01:00