]> source.dussan.org Git - gitea.git/log
gitea.git
4 years agoMySQL instance is needed for all triggers (#11484) v1.12.0-rc1
Lauris BH [Mon, 18 May 2020 16:14:28 +0000 (19:14 +0300)]
MySQL instance is needed for all triggers (#11484)

4 years agoChangelog for v1.12.0-rc1 (#11462)
Lauris BH [Mon, 18 May 2020 13:04:04 +0000 (16:04 +0300)]
Changelog for v1.12.0-rc1 (#11462)

4 years agoFix comment box styling and cancelling (#11463) (#11464) (#11469) (#11467)
Lauris BH [Mon, 18 May 2020 09:17:35 +0000 (12:17 +0300)]
Fix comment box styling and cancelling (#11463) (#11464) (#11469) (#11467)

* Fix styling of resolved code comment box (#11463)

Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix .comment-code-cloud not being removed when cancelling new code comment (#11464)

* Fix footer padding for comment code reply form on issue event view (#11469)

Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
4 years agoEnsure public repositories in private organizations are visible and fix admin organiz...
6543 [Mon, 18 May 2020 06:21:00 +0000 (08:21 +0200)]
Ensure public repositories in private organizations are visible and fix admin organizations list (#11465) (#11474)

* Ensure that we can see public repositories in private organization

Fix #10144 (Again)

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix Admin users and organizations page

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update models/repo_list.go

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoFix "Unknown task: git_fsck" error on admin dashboard (#11468) (#11471)
6543 [Mon, 18 May 2020 05:31:49 +0000 (07:31 +0200)]
Fix "Unknown task: git_fsck" error on admin dashboard (#11468) (#11471)

* Fix "Unknown task: git_fsck" error on admin dashboard (#11468)

* Update .drone.yml

Co-authored-by: zeripath <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 17 May 2020 15:36:19 +0000 (15:36 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoIncrease width for authors on commit view (#11441)
Cirno the Strongest [Sun, 17 May 2020 15:35:07 +0000 (17:35 +0200)]
Increase width for authors on commit view (#11441)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 17 May 2020 14:16:15 +0000 (14:16 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoChange tab width for .go files to 4 (#11455)
silverwind [Sun, 17 May 2020 14:14:36 +0000 (16:14 +0200)]
Change tab width for .go files to 4 (#11455)

* Change tab width for .go files to 4

I thing 8-wide tabs are kind of archaic and inconsisten with template
files which already use 4-wide.

Also did some misc cleanups in the .editorconfig files.

* add css

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 17 May 2020 12:44:33 +0000 (12:44 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoWhenever the ctx.Session is updated, release it to save it before sending the redirec...
zeripath [Sun, 17 May 2020 12:43:29 +0000 (13:43 +0100)]
Whenever the ctx.Session is updated, release it to save it before sending the redirect (#11456)

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 17 May 2020 11:11:07 +0000 (11:11 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoDocs: add AlpineLinux packages (#11446)
6543 [Sun, 17 May 2020 11:09:56 +0000 (13:09 +0200)]
Docs: add AlpineLinux packages (#11446)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoFix translation to be compatible with crowdin (#11453)
Lauris BH [Sun, 17 May 2020 09:18:59 +0000 (12:18 +0300)]
Fix translation to be compatible with crowdin (#11453)

4 years agoAllow all members of private orgs to see public repos (#11442)
zeripath [Sun, 17 May 2020 08:22:17 +0000 (09:22 +0100)]
Allow all members of private orgs to see public repos (#11442)

* Allow all members of private orgs to see public repos

Fix #10144

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update models/repo_list.go

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoForcibly clean and destroy the session on logout (#11447)
zeripath [Sun, 17 May 2020 06:05:11 +0000 (07:05 +0100)]
Forcibly clean and destroy the session on logout (#11447)

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 17 May 2020 00:49:40 +0000 (00:49 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoCheck Push permissions on IsUserAllowedToUpdate (#11448)
6543 [Sun, 17 May 2020 00:48:30 +0000 (02:48 +0200)]
Check Push permissions on IsUserAllowedToUpdate (#11448)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 16 May 2020 23:33:25 +0000 (23:33 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoRefactor Cron and merge dashboard tasks (#10745)
zeripath [Sat, 16 May 2020 23:31:38 +0000 (00:31 +0100)]
Refactor Cron and merge dashboard tasks (#10745)

* Refactor Cron and merge dashboard tasks

* Merge Cron and Dashboard tasks
* Make every cron task report a system notice on completion
* Refactor the creation of these tasks
* Ensure that execution counts of tasks is correct
* Allow cron tasks to be started from the cron page

* golangci-lint fixes

* Enforce that only one task with the same name can be registered

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

Signed-off-by: Andrew Thornton <art27@cantab.net>
* as per @guillep2k

* as per @lafriks

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add git.CommandContext variants

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoHide archived repos by default in repo-list (#11440)
zeripath [Sat, 16 May 2020 22:12:03 +0000 (23:12 +0100)]
Hide archived repos by default in repo-list (#11440)

As discussed in #11268 hide archived repos by default in the
dashboard repo-list

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 16 May 2020 21:07:43 +0000 (21:07 +0000)]
[skip ci] Updated translations via Crowdin

4 years ago[UI] Adjust CSS details for adding emoticons (#11435)
L0veSunshine [Sat, 16 May 2020 21:06:34 +0000 (05:06 +0800)]
[UI] Adjust CSS details for adding emoticons (#11435)

* Adjust CSS details for added emoticons

* fix lint

* avoid git conflict

4 years agoMake API EditIssue and EditPullRequest issue notifications (#11123)
zeripath [Sat, 16 May 2020 21:05:19 +0000 (22:05 +0100)]
Make API EditIssue and EditPullRequest issue notifications (#11123)

* Make API EditIssue and EditPullRequest issue notifications

Restructure models.UpdateIssueByAPI and EditIssue/EditPullRequest
to issue notifications

Fix #10014

Signed-off-by: Andrew Thornton <art27@cantab.net>
* As per @6543

Signed-off-by: Andrew Thornton <art27@cantab.net>
* update status!

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoAdd paging and archive/private repository filtering to dashboard list (#11321)
zeripath [Sat, 16 May 2020 20:07:01 +0000 (21:07 +0100)]
Add paging and archive/private repository filtering to dashboard list (#11321)

* Add archived options to SearchRepository

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add only-private search

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add filter options and paging to dashboard repository page

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

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

Signed-off-by: Andrew Thornton <art27@cantab.net>
* as per @mrsdizzie also remember state

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoUse session for retrieving org teams (#11438)
guillep2k [Sat, 16 May 2020 19:29:29 +0000 (16:29 -0300)]
Use session for retrieving org  teams (#11438)

Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
4 years agoFix buttons left-margin (#11427)
Cirno the Strongest [Sat, 16 May 2020 17:45:44 +0000 (19:45 +0200)]
Fix buttons left-margin (#11427)

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoSupport view individual commit for wiki pages (#11415)
mrsdizzie [Sat, 16 May 2020 16:38:40 +0000 (12:38 -0400)]
Support view individual commit for wiki pages (#11415)

Currently you can see a list of commit history for wiki pages but aren't able to view the commit diff itself. This adds the feature to view an individual commit to a wiki repo.

Closes #8999

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years agoBetter styling for code review comment textarea (#11428)
Cirno the Strongest [Sat, 16 May 2020 15:50:36 +0000 (17:50 +0200)]
Better styling for code review comment textarea (#11428)

* Better styling for code review comment textarea

* align tabular menu with textarea

* border around active tab instead of textarea

* border radius

* use .28571429rem

4 years agoAllow log.xxx.default to set logging settings for the default logger only (#11292)
zeripath [Sat, 16 May 2020 02:38:52 +0000 (03:38 +0100)]
Allow log.xxx.default to set logging settings for the default logger only (#11292)

* Allow log.xxx.default to set logging settings for the default logger only

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update modules/setting/log.go

* as per @silverwind add some documentation

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoFix margin on attached segment headers when they are separated by other element ...
Cirno the Strongest [Sat, 16 May 2020 01:35:22 +0000 (03:35 +0200)]
Fix margin on attached segment headers when they are separated by other element (#11425)

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoFix yellow background on active elements in code review (#11414)
Cirno the Strongest [Sat, 16 May 2020 00:55:19 +0000 (02:55 +0200)]
Fix yellow background on active elements in code review (#11414)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoBetter styling for code review comment form (#11413)
Cirno the Strongest [Fri, 15 May 2020 22:54:18 +0000 (00:54 +0200)]
Better styling for code review comment form (#11413)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoCheck that the ctx.User is not nil before checking its ID (#11424)
zeripath [Fri, 15 May 2020 20:44:33 +0000 (21:44 +0100)]
Check that the ctx.User is not nil before checking its ID (#11424)

Fix #11423

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoUpdate JS dependencies (#11412)
silverwind [Fri, 15 May 2020 19:46:49 +0000 (21:46 +0200)]
Update JS dependencies (#11412)

A bugfix for JS syntax in highlight.js and some misc updates.

4 years agoFix webhook template when validation errors occur (#11421)
kolaente [Fri, 15 May 2020 19:02:46 +0000 (21:02 +0200)]
Fix webhook template when validation errors occur (#11421)

Signed-off-by: kolaente <k@knt.li>
4 years agoFix issue ref migration (#11419)
kolaente [Fri, 15 May 2020 14:05:18 +0000 (16:05 +0200)]
Fix issue ref migration (#11419)

The migration introduced in #8742 breaks mysql installations. This pr fixes that by correctly using CONCAT.

Signed-off-by: kolaente <k@knt.li>
4 years agoHandle panics that percolate up to the graceful module (#11291)
zeripath [Fri, 15 May 2020 00:06:00 +0000 (01:06 +0100)]
Handle panics that percolate up to the graceful module (#11291)

* Handle panics in graceful goroutines

Adds a some deferred functions to handle panics in graceful goroutines

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Handle panic in webhook.Deliver

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Handle panic in mirror.syncMirror

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agodocs: update 'Testing redux' in CONTRIBUTING.md (#11386)
赵智超 [Thu, 14 May 2020 23:28:26 +0000 (07:28 +0800)]
docs: update 'Testing redux' in CONTRIBUTING.md (#11386)

* docs: update 'Testing redux' in CONTRIBUTING.md

try simplfy it to make it more easy for contributor to follow it to
test their work by themselves.

Signed-off-by: a1012112796 <1012112796@qq.com>
* align help message strings

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoFix ref links in issue overviews for tags (#8742)
Sijmen Schoon [Thu, 14 May 2020 22:55:43 +0000 (00:55 +0200)]
Fix ref links in issue overviews for tags (#8742)

* Properly generate ref URLs

Tags used to not generate correct URLs (src/branch/tags/1.0.0 instead of
src/tags/1.0.0).

Also cleans up some code around it with the created helper functions.

* Fix formatting and create migration

* Add copyright head to utils_test

* Use a raw query for the ref migration

* Remove semicolon

* Quote column and table names in migration SQL

* Change || to CONCAT, since MSSQL does not support ||

* Make migration engine aware

* Add missing import

* Move ref EndName and URL to the issue service

* Fix tests

* Add test for commit refs

* Update issue.go

* Use the right command for building JavaScript bundles

* Prepare for merge

* Check for refs/* before prepending in migration

* Update services/issue/issue_test.go

* Update modules/git/utils_test.go

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: techknowlogick <matti@mdranta.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 14 May 2020 21:35:09 +0000 (21:35 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoAdd localization docs (#11411)
John Olheiser [Thu, 14 May 2020 21:33:52 +0000 (16:33 -0500)]
Add localization docs (#11411)

* Add localization docs

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Clarify bleeding edge vs release

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Capitalize Crowdin

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoPrettify timeline 3 (#11139)
Sorien [Thu, 14 May 2020 19:15:21 +0000 (21:15 +0200)]
Prettify timeline 3 (#11139)

* Fix timeline comments sections borders

* Fix files dropzone right alignment

* Update review comment form and controls

* Clear segment style from comment form tabs

* Remove segment class from pulls tab

* Fix Time Tracker - Add Time button border

* Fix buttons right alignment

* Markdown tab minimal height

* Fix DropZone hover effect

* Fix Lint + remove unused controls class

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 14 May 2020 18:00:33 +0000 (18:00 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix svg octicon-key placement (#11410)
Cirno the Strongest [Thu, 14 May 2020 17:59:18 +0000 (19:59 +0200)]
Fix svg octicon-key placement (#11410)

4 years agoSwitch code editor to Monaco (#11366)
silverwind [Thu, 14 May 2020 16:06:01 +0000 (18:06 +0200)]
Switch code editor to Monaco (#11366)

* Switch code editor to Monaco

This switches out CodeMirror for Monaco which is based on the same code
base as VS code and should work pretty similar to it.

It does add a few async chunks, totalling around 10MB to our build. It
currently supports around 65 languages and in the default configuration,
each language would emit one ugly [number].js chunk, so I opted to
combine them all into a single file for now.

CodeMirror is still being used under the hood by SimpleMDE so it can not
be removed yet.

* inline editorconfig, fix diff, use for markdown, remove more dead code

* refactors, remove jquery usage

* use tab_width

* fix intellisense

* rename function for clarity

* misc tweaks, enable webpack progress display

* only use --progress on dev build

* remove useless borders in arc-green

* fix typo

* remove obsolete comment

* small refactor

* fix file creation and various refactors

* unset useTabStops too when no editorconfig

* small refactor

* disable webpack's [big] warnings

* remove useless await

* fix dark theme check

* rename chunk to 'monaco'

* add to .gitignore and delete webpack dest before build

* increase editor height

* support more editorconfig properties

* remove empty element filter

* rename

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 13 May 2020 23:00:00 +0000 (23:00 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoAdd awesome-gitea reference on install from package docs (#11405)
John Olheiser [Wed, 13 May 2020 22:58:49 +0000 (17:58 -0500)]
Add awesome-gitea reference on install from package docs (#11405)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoChange install description (#11395)
John Olheiser [Wed, 13 May 2020 09:08:44 +0000 (04:08 -0500)]
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>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 13 May 2020 07:52:13 +0000 (07:52 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoRevert "Avoid 0 new commits messages to be send (#11082)" (#11397)
zeripath [Wed, 13 May 2020 07:50:56 +0000 (08:50 +0100)]
Revert "Avoid 0 new commits messages to be send (#11082)" (#11397)

This reverts commit 6034f8bcaaa5348fee775d2307ff03162130a088.

4 years agoAdd missing card component to semantic.json (#11394)
Cirno the Strongest [Wed, 13 May 2020 01:43:06 +0000 (03:43 +0200)]
Add missing card component to semantic.json (#11394)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoRefactor Milestone related (#11225)
6543 [Tue, 12 May 2020 21:54:35 +0000 (23:54 +0200)]
Refactor Milestone related (#11225)

4 years agoUnfortunately go template if does not shortcut (#11392)
zeripath [Tue, 12 May 2020 21:01:27 +0000 (22:01 +0100)]
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>
4 years agoEnsure search action button coalesced to adjacent input (#11385)
zeripath [Tue, 12 May 2020 19:08:43 +0000 (20:08 +0100)]
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>
4 years agoui: Replenish the missing ‘PageIsSignUp’ in sign up view (#11390)
赵智超 [Tue, 12 May 2020 18:01:15 +0000 (02:01 +0800)]
ui: Replenish the missing ‘PageIsSignUp’ in sign up view (#11390)

Signed-off-by: a1012112796 <1012112796@qq.com>
4 years agoUpdate docs to reflect new location of homebrew repo (#11384)
techknowlogick [Tue, 12 May 2020 12:51:41 +0000 (08:51 -0400)]
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>
4 years agoAllow compare page to look up base, head, own-fork, forkbase-of-head (#11327)
zeripath [Tue, 12 May 2020 05:52:46 +0000 (06:52 +0100)]
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>
4 years agoFix usage of removed jqXHR.success (#11379)
Cirno the Strongest [Tue, 12 May 2020 03:34:48 +0000 (05:34 +0200)]
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.

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 11 May 2020 22:05:16 +0000 (22:05 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoCorrectly set the organization num repos (#11339)
zeripath [Mon, 11 May 2020 22:04:08 +0000 (23:04 +0100)]
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>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 11 May 2020 09:45:39 +0000 (09:45 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoConsolidate API for getting single commit (#11368)
Cirno the Strongest [Mon, 11 May 2020 09:44:36 +0000 (11:44 +0200)]
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>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 11 May 2020 08:39:13 +0000 (08:39 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoSupport Range header end in lfs (#11314)
burbon [Mon, 11 May 2020 08:37:59 +0000 (09:37 +0100)]
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>
4 years agoPrevent 500 with badly formed task list (#11328)
zeripath [Sun, 10 May 2020 23:14:49 +0000 (00:14 +0100)]
Prevent 500 with badly formed task list (#11328)

Fix #11317

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoAdd gnupg to Dockerfile (#11365)
Cirno the Strongest [Sun, 10 May 2020 20:41:34 +0000 (22:41 +0200)]
Add gnupg to Dockerfile (#11365)

Co-authored-by: zeripath <art27@cantab.net>
4 years ago[Vendor] mssqldb: 2019-11-28 -> 2020-04-28 (#11364)
6543 [Sun, 10 May 2020 17:42:52 +0000 (19:42 +0200)]
[Vendor] mssqldb: 2019-11-28 -> 2020-04-28 (#11364)

 update go-mssqldb 2019-11-28 (1d7a30a10f73) -> 2020-04-28 (06a60b6afbbc)

4 years agoChanged image of openid-connect logo for better look on arc-green theme (#11312)
Leo [Sun, 10 May 2020 14:55:22 +0000 (16:55 +0200)]
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>
4 years agoMove LFS directory creation out of NewContext (#11362)
zeripath [Sun, 10 May 2020 13:30:46 +0000 (14:30 +0100)]
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>
4 years agoUpdate github.com/pquerna/otp from untagged to v1.2.0 (#11358)
6543 [Sun, 10 May 2020 12:50:16 +0000 (14:50 +0200)]
Update github.com/pquerna/otp from untagged to v1.2.0 (#11358)

4 years agoUpdate github.com/issue9/identicon from untagged to v1.0.1 (#11359)
6543 [Sun, 10 May 2020 10:23:17 +0000 (12:23 +0200)]
Update github.com/issue9/identicon from untagged to v1.0.1 (#11359)

Co-authored-by: zeripath <art27@cantab.net>
4 years agogithub.com/yohcop/openid-go update to first tagged version (#11357)
6543 [Sun, 10 May 2020 08:53:04 +0000 (10:53 +0200)]
github.com/yohcop/openid-go update to first tagged version (#11357)

4 years ago[Vendor] blevesearch v0.8.1 -> v1.0.7 (#11360)
6543 [Sun, 10 May 2020 05:40:54 +0000 (07:40 +0200)]
[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>
4 years agoFew tweaks in the hacking guide (#11345)
silverwind [Sat, 9 May 2020 22:11:30 +0000 (00:11 +0200)]
Few tweaks in the hacking guide (#11345)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoFrontport Changelog for v1.11.5 (#11356)
6543 [Sat, 9 May 2020 20:24:46 +0000 (22:24 +0200)]
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>
4 years agoFix tracked time issues (#11349)
6543 [Sat, 9 May 2020 14:18:44 +0000 (16:18 +0200)]
Fix tracked time issues (#11349)

* Fix nil exeption: #11313

* fix 500

* activate test 😆

* move logic

4 years agoLimit snap build architectures (#11346)
Alan Pope [Sat, 9 May 2020 04:39:19 +0000 (05:39 +0100)]
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)

4 years agoupdate snapcraft.yaml for core18 and latest features (#11300)
Sergio Schvezov [Fri, 8 May 2020 20:21:28 +0000 (17:21 -0300)]
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>
4 years agoAdd default CommitID for create pull review api (#11334)
赵智超 [Fri, 8 May 2020 18:50:23 +0000 (02:50 +0800)]
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>
4 years agoPrevent timer leaks in Workerpool and others (#11333)
zeripath [Fri, 8 May 2020 15:46:05 +0000 (16:46 +0100)]
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>
4 years agoAdd NotifySyncPushCommits to indexer notifier (#11309)
zeripath [Fri, 8 May 2020 14:58:40 +0000 (15:58 +0100)]
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>
4 years agoSplit some words from template to improve translation. (#11221)
L0veSunshine [Fri, 8 May 2020 12:39:17 +0000 (20:39 +0800)]
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>
4 years agoAdd EventSource support (#11235)
zeripath [Thu, 7 May 2020 21:49:00 +0000 (22:49 +0100)]
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
4 years agoWhen deleting a tracked time through the API return 404 not 500 (#11319)
6543 [Thu, 7 May 2020 17:54:33 +0000 (19:54 +0200)]
When deleting a tracked time through the API return 404 not 500 (#11319)

4 years agoManage port in submodule refurl (#11305)
zeripath [Thu, 7 May 2020 14:25:52 +0000 (15:25 +0100)]
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>
4 years agoPrevent multiple listings of organization when creating a repository (#11303)
6543 [Thu, 7 May 2020 13:24:59 +0000 (15:24 +0200)]
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>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 7 May 2020 06:48:52 +0000 (06:48 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoAdding advanced label set. (#11298)
opyale [Thu, 7 May 2020 06:47:34 +0000 (08:47 +0200)]
Adding advanced label set. (#11298)

Add an advanced label set to contrib

4 years agoProtect default branch against deletion (#11115)
6543 [Wed, 6 May 2020 11:08:45 +0000 (13:08 +0200)]
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>
4 years agoLoad Repo Topics on blame view (#11307)
6543 [Tue, 5 May 2020 21:51:49 +0000 (23:51 +0200)]
Load Repo Topics on blame view (#11307)

Fix #11280

4 years agoapi.Context.NotFound(...) should tolerate nil (#11288)
zeripath [Tue, 5 May 2020 18:52:13 +0000 (19:52 +0100)]
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>
4 years agoChange the style in admin notice content view from <p> to <pre> (#11301)
赵智超 [Tue, 5 May 2020 15:16:55 +0000 (23:16 +0800)]
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>
4 years agoUpdate JS dependencies (#11297)
silverwind [Tue, 5 May 2020 03:48:52 +0000 (05:48 +0200)]
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>
4 years agoAllow unauthenticated users to compare (#11240)
Kyle Evans [Mon, 4 May 2020 22:44:30 +0000 (17:44 -0500)]
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>
4 years agoFix Create new branch (#11294)
zeripath [Mon, 4 May 2020 20:55:52 +0000 (21:55 +0100)]
Fix Create new branch (#11294)

Fix #11212

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoFix; declare DOMAIN variable for docker setup (#10780)
Adrian POIGET [Mon, 4 May 2020 09:50:29 +0000 (11:50 +0200)]
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>
4 years agoUpdate lunny/levelqueue to 0.3.0 (#11285)
guillep2k [Mon, 4 May 2020 06:51:09 +0000 (03:51 -0300)]
Update lunny/levelqueue to 0.3.0 (#11285)

Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
4 years agoFix orgs not being displayed on create repo form (#11279)
Cirno the Strongest [Sun, 3 May 2020 21:08:24 +0000 (23:08 +0200)]
Fix orgs not being displayed on create repo form (#11279)

4 years agoRestore checkbox rendering and prevent poor sanitization of spans (#11277)
zeripath [Sun, 3 May 2020 20:17:24 +0000 (21:17 +0100)]
Restore checkbox rendering and prevent poor sanitization of spans  (#11277)

* Add test

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Restore checkbox rendering and prevent poor sanitization of spans

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

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

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