]> source.dussan.org Git - gitea.git/log
gitea.git
3 years agoFix bug that username missed on issue list assignee filter (#14481)
Lunny Xiao [Wed, 27 Jan 2021 12:47:00 +0000 (20:47 +0800)]
Fix bug that username missed on issue list assignee filter (#14481)

Co-authored-by: 6543 <6543@obermui.de>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 27 Jan 2021 10:02:09 +0000 (10:02 +0000)]
[skip ci] Updated translations via Crowdin

3 years ago[Feature] add precise search type for Elastic Search (#12869)
Jui-Nan Lin [Wed, 27 Jan 2021 10:00:35 +0000 (18:00 +0800)]
[Feature] add precise search type for Elastic Search (#12869)

* feat: add type query parameters for specifying precise search

* feat: add select dropdown in search box

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoPrint usefull error if SQLite is used in settings but not supported (#14476)
6543 [Wed, 27 Jan 2021 03:57:18 +0000 (04:57 +0100)]
Print usefull error if SQLite is used in settings but not supported (#14476)

* move log output to points where they are relefant

* check explicit of sqlite3 in settings

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 26 Jan 2021 22:48:54 +0000 (22:48 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoFix bug because of duplicated join (#14454)
Lunny Xiao [Tue, 26 Jan 2021 22:47:42 +0000 (06:47 +0800)]
Fix bug because of duplicated join (#14454)

* Fix bug because of duplicated join

* Move join into setupsession

* Fix bug

* Fix bug

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoCron job to cleanup hook_task table (#13080)
Brad Albright [Tue, 26 Jan 2021 21:02:42 +0000 (15:02 -0600)]
Cron job to cleanup hook_task table (#13080)

Close **Prune hook_task Table (#10741)**

Added a cron job to delete webhook deliveries in the hook_task table. It can be turned on/off and the schedule controlled globally via app.ini. The data can be deleted by either the age of the delivery which is the default or by deleting the all but the most recent deliveries _per webhook_.

Note: I had previously submitted pr #11416  but I closed it when I realized that I had deleted per repository instead of per webhook. Also, I decided allowing the settings to be overridden via the ui was overkill. Also this version allows the deletion by age which is probably what most people would want.

3 years agoFix panic 500 page rendering (#14474)
Lunny Xiao [Tue, 26 Jan 2021 18:04:20 +0000 (02:04 +0800)]
Fix panic 500 page rendering (#14474)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 26 Jan 2021 15:38:19 +0000 (15:38 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoMove macaron to chi (#14293)
Lunny Xiao [Tue, 26 Jan 2021 15:36:53 +0000 (23:36 +0800)]
Move macaron to chi (#14293)

Use [chi](https://github.com/go-chi/chi) instead of the forked [macaron](https://gitea.com/macaron/macaron). Since macaron and chi have conflicts with session share, this big PR becomes a have-to thing. According my previous idea, we can replace macaron step by step but I'm wrong. :( Below is a list of big changes on this PR.

- [x] Define `context.ResponseWriter` interface with an implementation `context.Response`.
- [x] Use chi instead of macaron, and also a customize `Route` to wrap chi so that the router usage is similar as before.
- [x] Create different routers for `web`, `api`, `internal` and `install` so that the codes will be more clear and no magic .
- [x] Use https://github.com/unrolled/render instead of macaron's internal render
- [x] Use https://github.com/NYTimes/gziphandler instead of https://gitea.com/macaron/gzip
- [x] Use https://gitea.com/go-chi/session which is a modified version of https://gitea.com/macaron/session and removed `nodb` support since it will not be maintained. **BREAK**
- [x] Use https://gitea.com/go-chi/captcha which is a modified version of https://gitea.com/macaron/captcha
- [x] Use https://gitea.com/go-chi/cache which is a modified version of https://gitea.com/macaron/cache
- [x] Use https://gitea.com/go-chi/binding which is a modified version of https://gitea.com/macaron/binding
- [x] Use https://github.com/go-chi/cors instead of https://gitea.com/macaron/cors
- [x] Dropped https://gitea.com/macaron/i18n and make a new one in `code.gitea.io/gitea/modules/translation`
- [x] Move validation form structs from `code.gitea.io/gitea/modules/auth` to `code.gitea.io/gitea/modules/forms` to avoid dependency cycle.
- [x] Removed macaron log service because it's not need any more. **BREAK**
- [x] All form structs have to be get by `web.GetForm(ctx)` in the route function but not as a function parameter on routes definition.
- [x] Move Git HTTP protocol implementation to use routers directly.
- [x] Fix the problem that chi routes don't support trailing slash but macaron did.
- [x] `/api/v1/swagger` now will be redirect to `/api/swagger` but not render directly so that `APIContext` will not create a html render.

Notices:
- Chi router don't support request with trailing slash
- Integration test `TestUserHeatmap` maybe mysql version related. It's failed on my macOS(mysql 5.7.29 installed via brew) but succeed on CI.

Co-authored-by: 6543 <6543@obermui.de>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 26 Jan 2021 01:22:19 +0000 (01:22 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoFix incorrect key name so registerManualConfirm setting works as expected. (#14455)
Dofri Jónsson [Tue, 26 Jan 2021 01:20:59 +0000 (02:20 +0100)]
Fix incorrect key name so registerManualConfirm setting works as expected. (#14455)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 24 Jan 2021 23:38:47 +0000 (23:38 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoUse caddy's certmagic library for extensible/robust ACME handling (#14177)
techknowlogick [Sun, 24 Jan 2021 23:37:35 +0000 (18:37 -0500)]
Use caddy's certmagic library for extensible/robust ACME handling (#14177)

* use certmagic for more extensible/robust ACME cert handling

* accept TOS based on config option

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoRedirect on changed user and org name (#11649)
Andrew Bezold [Sun, 24 Jan 2021 15:23:05 +0000 (10:23 -0500)]
Redirect on changed user and org name (#11649)

* Add redirect for user

* Add redirect for orgs

* Add user redirect test

* Appease linter

* Add comment to DeleteUserRedirect function

* Fix locale changes

* Fix GetUserByParams

* Fix orgAssignment

* Remove debug logging

* Add redirect prompt

* Dont Export DeleteUserRedirect & only use it within a session

* Unexport newUserRedirect

* cleanup

* Fix & Dedub API code

* Format Template

* Add Migration & rm dublicat

* Refactor: unexport newRepoRedirect() & rm dedub del exec

* if this fails we'll need to re-rename the user directory

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agochore: bump minio to RELEASE.2021-01-16T02-19-44Z (#14445)
wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf [Sun, 24 Jan 2021 14:46:08 +0000 (15:46 +0100)]
chore: bump minio to RELEASE.2021-01-16T02-19-44Z (#14445)

-    image: minio/minio:RELEASE.2020-10-09T22-55-05Z
+    image: minio/minio:RELEASE.2021-01-16T02-19-44Z

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 24 Jan 2021 12:23:25 +0000 (12:23 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoCI: skip build steps for cron update works (#14443)
a1012112796 [Sun, 24 Jan 2021 12:21:33 +0000 (20:21 +0800)]
CI: skip build steps for cron update works (#14443)

Signed-off-by: a1012112796 <1012112796@qq.com>
3 years ago[skip ci] Updated licenses and gitignores
GiteaBot [Sun, 24 Jan 2021 00:19:18 +0000 (00:19 +0000)]
[skip ci] Updated licenses and gitignores

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 23 Jan 2021 19:34:53 +0000 (19:34 +0000)]
[skip ci] Updated translations via Crowdin

3 years agojust overload to not get it by mistake again ... (#14440)
6543 [Sat, 23 Jan 2021 19:33:43 +0000 (20:33 +0100)]
just overload to not get it by mistake again ... (#14440)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 23 Jan 2021 14:45:16 +0000 (14:45 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoAdd link to packages in openSUSE build service (#14439)
Klaus Vink Slott [Sat, 23 Jan 2021 14:44:00 +0000 (15:44 +0100)]
Add link to packages in openSUSE build service (#14439)

* Link to OpenSUSE build service

3 years agoImprove Description in new/ edit Project template (#14429)
delvh [Sat, 23 Jan 2021 10:30:28 +0000 (11:30 +0100)]
Improve Description in new/ edit Project template (#14429)

Fixes #14358

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoDon't show "Reference in new issue" when issues unit is globally disabled (#14437)
Jimmy Praet [Sat, 23 Jan 2021 03:58:22 +0000 (04:58 +0100)]
Don't show "Reference in new issue" when issues unit is globally disabled (#14437)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoCI: Update license & gitignore by cron (#14419)
a1012112796 [Sat, 23 Jan 2021 02:53:13 +0000 (10:53 +0800)]
CI: Update license & gitignore by cron (#14419)

do generate-license & generate-gitignore by cron

close #12684

Signed-off-by: a1012112796 <1012112796@qq.com>
3 years agoFix close/reopen with comment (#14436)
Jimmy Praet [Sat, 23 Jan 2021 02:08:19 +0000 (03:08 +0100)]
Fix close/reopen with comment (#14436)

it previously only worked for the simple textarea, and not for the rich textarea

3 years agoAdd german translation guidelines (#14283)
kolaente [Fri, 22 Jan 2021 19:12:50 +0000 (20:12 +0100)]
Add german translation guidelines (#14283)

* Add german translation guidelines

* Add German Language to Docs

* add Translation cateory & move guidelines into it

Co-authored-by: kolaente <k@knt.li>
Co-authored-by: 6543 <6543@obermui.de>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 22 Jan 2021 17:50:31 +0000 (17:50 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoFix lfs preview bug (#14428)
Lunny Xiao [Fri, 22 Jan 2021 17:49:13 +0000 (01:49 +0800)]
Fix lfs preview bug (#14428)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 22 Jan 2021 07:23:00 +0000 (07:23 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoBump gsap from 3.5.1 to 3.6.0 (#14410)
dependabot[bot] [Fri, 22 Jan 2021 07:21:45 +0000 (02:21 -0500)]
Bump gsap from 3.5.1 to 3.6.0 (#14410)

Bumps [gsap](https://github.com/greensock/GSAP) from 3.5.1 to 3.6.0.
- [Release notes](https://github.com/greensock/GSAP/releases)
- [Commits](https://github.com/greensock/GSAP/compare/3.5.1...3.6.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoEnhance Ghost comment mitigation Settings (#14392)
6543 [Fri, 22 Jan 2021 02:56:19 +0000 (03:56 +0100)]
Enhance Ghost comment mitigation Settings (#14392)

* refactor models.DeleteComment and delete related reactions too

* use deleteComment for UserDeleteWithCommentsMaxDays in DeleteUser

* nits

* Use time.Duration as other time settings have

* docs

* Resolve Fixme & fix potential deadlock

* Disabled by Default

* Update Config Value Description

* switch args

* Update models/issue_comment.go

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 22 Jan 2021 00:29:25 +0000 (00:29 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoensure timeout error is shown on u2f timeout (#14417)
zeripath [Fri, 22 Jan 2021 00:28:14 +0000 (00:28 +0000)]
ensure timeout error is shown on u2f timeout (#14417)

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoAdd TrN for repository limit (#12492)
EV3R4 [Thu, 21 Jan 2021 23:44:37 +0000 (00:44 +0100)]
Add TrN for repository limit (#12492)

* Added TrN for repository limit

* Removed form.reach_limit_of_creation_0

* disable Create Button if user can not create

Co-authored-by: 6543 <6543@obermui.de>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 21 Jan 2021 22:15:39 +0000 (22:15 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoUpdate golangci-lint to 1.35.2 (#14418)
techknowlogick [Thu, 21 Jan 2021 22:14:23 +0000 (17:14 -0500)]
Update golangci-lint to 1.35.2 (#14418)

3 years agoAllow ssh-keygen on Windows to detect ssh key type (#14413)
Chester Liu [Thu, 21 Jan 2021 20:10:36 +0000 (04:10 +0800)]
Allow ssh-keygen on Windows to detect ssh key type (#14413)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 21 Jan 2021 19:35:12 +0000 (19:35 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoAdd support to migrate from gogs (#14342)
6543 [Thu, 21 Jan 2021 19:33:58 +0000 (20:33 +0100)]
Add support to migrate from gogs (#14342)

Add support to migrate gogs:

  *  issues
  *  comments
  *  labels
  *  milestones
  *  wiki

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Andrew Thornton <art27@cantab.net>
3 years agoDisplay current stopwatch in navbar (#14122)
Norwin [Thu, 21 Jan 2021 14:51:52 +0000 (14:51 +0000)]
Display current stopwatch in navbar (#14122)

* add notification about running stopwatch to header

* serialize seconds, duration in stopwatches api

* ajax update stopwatch

i should get my testenv working locally...

* new variant: hover dialog

* noscript compatibility

* js: live-update stopwatch time

* js live update robustness

3 years agoComment - Reference in new issue (#14366)
KN4CK3R [Thu, 21 Jan 2021 13:51:17 +0000 (14:51 +0100)]
Comment - Reference in new issue (#14366)

* Implemented "Reference in new issue"

* Fixed menu style on "pulls/x/files" because "button" has a style.

* Added context menu for PR file comments.

* Use only a single modal for every comment.

* Use current repository as default. Added search filter.

* Added suggested changes.

* Fixed assignment.

Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
3 years agoupdate ssh passthrough (#14403)
Patrick Schratz [Thu, 21 Jan 2021 02:25:18 +0000 (03:25 +0100)]
update ssh passthrough (#14403)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 20 Jan 2021 21:19:05 +0000 (21:19 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoload U2F js only on pages which need it (#11585)
Kamil Domański [Wed, 20 Jan 2021 21:17:46 +0000 (22:17 +0100)]
load U2F js only on pages which need it (#11585)

* load U2F js only on pages which need it

* Update templates/base/head.tmpl

3 years agoAdd support for ed25519_sk and ecdsa_sk SSH keys (#13462)
Artemis Tosini [Wed, 20 Jan 2021 20:36:55 +0000 (20:36 +0000)]
Add support for ed25519_sk and ecdsa_sk SSH keys (#13462)

* Add support for ed25519_sk and ecdsa_sk SSH keys

These start with sk-ssh-ed25519@openssh.com and sk-ecdsa-sha2-nistp256@openssh.com.
They are supported in recent versions of go x/crypto/ssh and OpenSSH 8.2
or higher.

* skip ssh-keygen

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Andrew Thornton <art27@cantab.net>
3 years agoProject: show referenced PRs in issue cards (#14183)
Roberto Santalla [Wed, 20 Jan 2021 19:53:48 +0000 (20:53 +0100)]
Project: show referenced PRs in issue cards (#14183)

Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoPrevent panic on fuzzer provided string (#14405)
zeripath [Wed, 20 Jan 2021 15:10:50 +0000 (15:10 +0000)]
Prevent panic on fuzzer provided string (#14405)

* Prevent panic on fuzzer provided string

The fuzzer has found that providing a <body> tag with an attribute to
PostProcess causes a panic. This PR removes any rendered html or body
tags from the output.

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

* placate lint again

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

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoupgrade to alpine 3.13 (#14343)
techknowlogick [Wed, 20 Jan 2021 04:21:01 +0000 (23:21 -0500)]
upgrade to alpine 3.13 (#14343)

3 years agoFix log http status is always zero (#14400)
Lunny Xiao [Wed, 20 Jan 2021 01:47:43 +0000 (09:47 +0800)]
Fix log http status is always zero (#14400)

* Fix log http status is always zero

* Fix lint

Co-authored-by: 6543 <6543@obermui.de>
3 years agoAlign dropdown right (#14406)
Kyle D [Wed, 20 Jan 2021 01:08:21 +0000 (18:08 -0700)]
Align dropdown right (#14406)

3 years agoNote that all template directories are relative to the `CustomPath` configuration...
Jake Howard [Tue, 19 Jan 2021 15:50:55 +0000 (15:50 +0000)]
Note that all template directories are relative to the `CustomPath` configuration, not a `custom` directory inside it (#14399)

* Note that all template directories are relative to the `CustomPath` configuration, not a `custom` directory inside it.

This is a minor clarification, which makes locating where the templates need to be much easier

* Note that it's possible to read the `GITEA_CUSTOM` value from the admin

* Use "$GITEA_CUSTOM" as placeholder

It's more obvious it's a variable and not a typo

3 years agoAdd pager to the branches page (#14202)
Chester Liu [Tue, 19 Jan 2021 04:07:38 +0000 (12:07 +0800)]
Add pager to the branches page (#14202)

* Add pager to the branches page

* override pageSize if bigger than max

* Make branches commit range configurable

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: silverwind <me@silverwind.io>
3 years agoRemoved invalid form tag (#14391)
KN4CK3R [Tue, 19 Jan 2021 03:02:47 +0000 (04:02 +0100)]
Removed invalid form tag (#14391)

introduced by #5073

3 years agoUpdate back-up restore example for 1.13 changes (#14374)
Daniel Vos [Tue, 19 Jan 2021 02:05:11 +0000 (03:05 +0100)]
Update back-up restore example for 1.13 changes (#14374)

Signed-off-by: Daniël Vos <danielvos@outlook.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoIt seems vet on windows is unnecessary (#14302)
Lunny Xiao [Tue, 19 Jan 2021 01:56:10 +0000 (09:56 +0800)]
It seems vet on windows is unnecessary (#14302)

* It seems vet on windows is unnecessary

* add vet back to drone but remove GOOS and GOARCH when build vet

3 years agoUse path not filepath in routers/editor (#14390)
zeripath [Mon, 18 Jan 2021 23:20:10 +0000 (23:20 +0000)]
Use path not filepath in routers/editor (#14390)

The incorrect use of filepath instead of path means that
it is possible to cause a stackoverflow on Windows

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoDisplay error if twofaSecret cannot be retrieved (#14372)
Ash McKenzie [Mon, 18 Jan 2021 20:38:41 +0000 (07:38 +1100)]
Display error if twofaSecret cannot be retrieved (#14372)

3 years agoCheck if label template exist first (#14384)
6543 [Mon, 18 Jan 2021 20:00:50 +0000 (21:00 +0100)]
Check if label template exist first (#14384)

* add check

* refactor

* rollback repo on error after session closed

3 years agoAllow passcode invalid error to appear (#14371)
Ash McKenzie [Mon, 18 Jan 2021 08:51:32 +0000 (19:51 +1100)]
Allow passcode invalid error to appear (#14371)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years agoexclude authored PRs from Review Requested filter (#14368)
Jimmy Praet [Mon, 18 Jan 2021 05:13:15 +0000 (06:13 +0100)]
exclude authored PRs from Review Requested filter (#14368)

Co-authored-by: Lauris BH <lauris@nix.lv>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 18 Jan 2021 01:22:31 +0000 (01:22 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoUpgrade blevesearch dependency to v2.0.1 (#14346)
Lauris BH [Mon, 18 Jan 2021 01:21:14 +0000 (03:21 +0200)]
Upgrade blevesearch dependency to v2.0.1 (#14346)

* Upgrade blevesearch dependency to v2.0.1

* Update rupture to v1.0.0

* Fix test

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 17 Jan 2021 20:49:54 +0000 (20:49 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoImplement ghost comment mitigation (#14349)
6543 [Sun, 17 Jan 2021 20:48:38 +0000 (21:48 +0100)]
Implement ghost comment mitigation (#14349)

* Implement ghost comment mitigation

Adds a config option USER_DELETE_WITH_COMMENTS_MAX_DAYS to the [service] section. See https://codeberg.org/Codeberg/Discussion/issues/24 for the underlying issue.

* cleanup

* use setting module correctly

* add to docs

Co-authored-by: Moritz Marquardt <git@momar.de>
3 years agoAdd edit, delete and reaction support to code review comments on issue page (#14339)
Lauris BH [Sun, 17 Jan 2021 17:29:10 +0000 (19:29 +0200)]
Add edit, delete and reaction support to code review comments on issue page (#14339)

3 years agoAdd review requested filter on pull request overview (#13701)
Jimmy Praet [Sun, 17 Jan 2021 16:34:19 +0000 (17:34 +0100)]
Add review requested filter on pull request overview (#13701)

* Add review requested filter on pull request overview #13682

fix formatting

* add review_requested filter to /repos/issues/search API endpoint

* only Approve and Reject status should supersede Request status

* add support for team reviews

* refactor: remove duplication of issue filtering conditions

3 years agoescape branch names in compare url (#14364)
Jimmy Praet [Sun, 17 Jan 2021 14:57:42 +0000 (15:57 +0100)]
escape branch names in compare url (#14364)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 17 Jan 2021 14:17:10 +0000 (14:17 +0000)]
[skip ci] Updated translations via Crowdin

3 years agolabel and milestone webhooks on issue/pull creation (#14363)
Jimmy Praet [Sun, 17 Jan 2021 14:15:57 +0000 (15:15 +0100)]
label and milestone webhooks on issue/pull creation (#14363)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 16 Jan 2021 11:24:18 +0000 (11:24 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoFix middlewares sequences (#14354)
Lunny Xiao [Sat, 16 Jan 2021 11:23:02 +0000 (19:23 +0800)]
Fix middlewares sequences (#14354)

Co-authored-by: 6543 <6543@obermui.de>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 16 Jan 2021 04:56:29 +0000 (04:56 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoSort issue search results by revelance (#14353)
Lauris BH [Sat, 16 Jan 2021 04:55:17 +0000 (06:55 +0200)]
Sort issue search results by revelance (#14353)

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 15 Jan 2021 20:30:48 +0000 (20:30 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoKanBan: be able to set default board (#14147)
6543 [Fri, 15 Jan 2021 20:29:32 +0000 (21:29 +0100)]
KanBan: be able to set default board (#14147)

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: zeripath <art27@cantab.net>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 15 Jan 2021 09:39:56 +0000 (09:39 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoKd/fix allow svg doctype (#14344)
Kyle D [Fri, 15 Jan 2021 09:38:41 +0000 (02:38 -0700)]
Kd/fix allow svg  doctype (#14344)

* make svg regex case-insensitive & use strict word boundary

* allow doctype svg

* add doctype tests

* allow <!DOCTYPE svg> and <svg/>

3 years agorestrict query selector to edit form (#14307)
Norwin [Fri, 15 Jan 2021 04:55:51 +0000 (04:55 +0000)]
restrict query selector to edit form (#14307)

Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoMerge default and system webhooks under one menu (#14244)
Lauris BH [Thu, 14 Jan 2021 23:24:03 +0000 (01:24 +0200)]
Merge default and system webhooks under one menu (#14244)

3 years agoUse IsProd instead of testing if it's equal. (#14336)
Lunny Xiao [Thu, 14 Jan 2021 21:17:03 +0000 (05:17 +0800)]
Use IsProd instead of testing if it's equal. (#14336)

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
3 years agoUse ServerError provided by Context (#14333)
Lunny Xiao [Thu, 14 Jan 2021 20:27:22 +0000 (04:27 +0800)]
Use ServerError provided by Context (#14333)

... instead of InternalServerError by macaron

3 years agoFix typo (#14332)
Lunny Xiao [Thu, 14 Jan 2021 15:35:10 +0000 (23:35 +0800)]
Fix typo (#14332)

3 years agoUse Request.URL.RequestURI() for fcgi (#14312) (#14314)
Kyungmin Bae [Wed, 13 Jan 2021 20:30:46 +0000 (05:30 +0900)]
Use Request.URL.RequestURI() for fcgi (#14312) (#14314)

3 years agoUpdate Link
techknowlogick [Wed, 13 Jan 2021 15:55:52 +0000 (10:55 -0500)]
Update Link

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 13 Jan 2021 15:54:47 +0000 (15:54 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoKd/add bountysource (#14323)
Kyle D [Wed, 13 Jan 2021 15:53:17 +0000 (08:53 -0700)]
Kd/add bountysource (#14323)

* Add bountysource to Sponsors link

* Add badge to readme

3 years agoIssues overview should not show issues from archived repos (#13220)
Elena Neuschild [Wed, 13 Jan 2021 04:19:17 +0000 (05:19 +0100)]
Issues overview should not show issues from archived repos (#13220)

* Add lots of comments to user.Issues()

* Answered some questions from comments

* fix typo in comment

* Refac user.Issues(): add func repoIDs

* Refac user.Issues(): add func userRepoIDs

* Refac user.Issues(): add func issueIDsFromSearch

* Refac user.Issues(): improve error handling

* Refac user.Issues(): add inline documentation and move variable declarations closer to their usages

* Refac user.Issues(): add func repoIDMap

* Refac user.Issues(): cleanup

* Refac: Separate Issues from Pulls during routing

* fix typo in comment

* Adapt Unittests to Refactoring

* Issue13171: Issue and PR Overviews now ignore archived Repositories

* changed some verbatim SQL conditions to builder.Eq

* models/issue.go: use OptionalBool properly

Co-authored-by: 6543 <6543@obermui.de>
* Use IsArchived rather than ExcludeArchivedRepos

* fixed broken test after merge

* added nil check

* Added Unit Test securing Issue 13171 fix

* Improved IsArchived filtering in issue.GetUserIssueStats

* Removed unused func

* Added grouping to avoid returning duplicate repo IDs

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Gitea <gitea@fake.local>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoDisplay SVG files as images instead of text (#14101)
Jonathan Tran [Wed, 13 Jan 2021 03:45:19 +0000 (22:45 -0500)]
Display SVG files as images instead of text (#14101)

* Change to display SVG files as images

* Remove unsafe styles from SVG CSP

* Add integration test to test SVG headers

* Add config setting to disable SVG rendering

* Add test for img tag when loading SVG image

* Remove the Raw view button for svg files since we don't fully support this

* Fix copyright year

* Rename and move config setting

* Add setting to cheat sheet in docs

* Fix so that comment matches cheat sheet

* Add allowing styles in CSP based on pull request feedback

* Re-enable raw button since we show SVG styles now

* Change so that SVG files are editable

* Add UI to toggle between source and rendered image for SVGs

* Change to show blame button for SVG images

* Fix to update ctx data

* Add test for DetectContentType when file is longer than sniffLen

Co-authored-by: Jonathan Tran <jon@allspice.io>
Co-authored-by: Kyle D <kdumontnu@gmail.com>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 13 Jan 2021 00:51:06 +0000 (00:51 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoUpdate docs to clarify issues raised in #14272 (#14318)
Nuno Silva [Wed, 13 Jan 2021 00:49:52 +0000 (00:49 +0000)]
Update docs to clarify issues raised in #14272 (#14318)

- example config is not supposed to be copied
- 'persistable-channel' uses a leveldb internally
- '*CONN_STR' overrides queue DIR

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 10 Jan 2021 18:06:29 +0000 (18:06 +0000)]
[skip ci] Updated translations via Crowdin

3 years ago[Refactor] Passwort Hash/Set (#14282)
6543 [Sun, 10 Jan 2021 18:05:18 +0000 (19:05 +0100)]
[Refactor] Passwort Hash/Set (#14282)

* move SaltGeneration into HashPasswort and rename it to what it does

* Migration: Where Password is Valid with Empty String delete it

* prohibit empty password hash

* let SetPassword("") unset pwd stuff

3 years agoAdd option to change username to the admin panel (#14229)
6543 [Sun, 10 Jan 2021 12:14:02 +0000 (13:14 +0100)]
Add option to change username to the admin panel (#14229)

Co-authored-by: Bwko <bouwko@gmail.com>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: zeripath <art27@cantab.net>
3 years agofix mailIssueCommentBatch for pull request (#14252)
a1012112796 [Sat, 9 Jan 2021 17:34:08 +0000 (01:34 +0800)]
fix mailIssueCommentBatch for pull request (#14252)

fix #14250

Signed-off-by: a1012112796 <1012112796@qq.com>
3 years agoRemove self from MAINTAINERS (#14286)
Cirno the Strongest [Sat, 9 Jan 2021 06:53:19 +0000 (07:53 +0100)]
Remove self from MAINTAINERS (#14286)

My time is limited and given recent developments, I don't think i want to dedicate any more of my time to this project.

3 years agoDo not reload page after adding comments in Pull Request reviews (#13877)
Jimmy Praet [Fri, 8 Jan 2021 21:49:55 +0000 (22:49 +0100)]
Do not reload page after adding comments in Pull Request reviews (#13877)

Fixed #8861
* use ajax on PR review page

* handle review comments

* extract duplicate code

FetchCodeCommentsByLine was initially more or less copied from fetchCodeCommentsByReview. Now they both use a common findCodeComments function instead

* use the Engine that was passed into the method

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoFix session bug when introduce chi (#14287)
Lunny Xiao [Fri, 8 Jan 2021 12:15:06 +0000 (20:15 +0800)]
Fix session bug when introduce chi (#14287)

* Update go-chi session

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 7 Jan 2021 13:41:39 +0000 (13:41 +0000)]
[skip ci] Updated translations via Crowdin