]> source.dussan.org Git - gitea.git/log
gitea.git
3 years agoFix arc theme label backgrounds (#13267)
Iván Valdés [Thu, 22 Oct 2020 19:48:48 +0000 (12:48 -0700)]
Fix arc theme label backgrounds (#13267)

* Fix arc theme label backgrounds

* Add specific style to yellow labels (background + border color)
* Remove !important from label's background rule to avoid breaking user
  defined labels. Make the rule more specific to override fomantic UI
  default white background

* Remove unnecesary selector

Co-authored-by: zeripath <art27@cantab.net>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 22 Oct 2020 18:03:41 +0000 (18:03 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoClarify app.example.ini documentation (#13256)
Mattias Persson [Thu, 22 Oct 2020 18:02:28 +0000 (20:02 +0200)]
Clarify app.example.ini documentation (#13256)

* Clarify app.example.ini documentation

Hard to understand if cron i needed to activate all other cron.

* Added missing "Extended cron tasks" to config-cheat-sheet.en-us.md

cron default is false - setting it true activates all cron. Changed the documentation accordingly

* Fixed spelling

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 22 Oct 2020 17:05:26 +0000 (17:05 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoadd sdk links to docs (#13266)
M4RKUS-11111 [Thu, 22 Oct 2020 17:04:23 +0000 (19:04 +0200)]
add sdk links to docs (#13266)

* add sdk links to docs

* Update docs/content/doc/advanced/api-usage.en-us.md

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: Markus <git+markus@obermui.de>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 22 Oct 2020 15:46:58 +0000 (15:46 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoKeep database transactions not too big (#13254)
Lunny Xiao [Thu, 22 Oct 2020 15:45:54 +0000 (23:45 +0800)]
Keep database transactions not too big (#13254)

* Keep database transactions not too big

* Fix #13255

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Only cache the last repo

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Andrew Thornton <art27@cantab.net>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 22 Oct 2020 05:47:21 +0000 (05:47 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoMigrations: Gitea should not fail just because of no apiConfig return (#13229)
6543 [Thu, 22 Oct 2020 05:46:18 +0000 (07:46 +0200)]
Migrations: Gitea should not fail just because of no apiConfig return (#13229)

* close #13227

* log it

:+1:

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoInform user of how disable SSH feature when installing using Docker (#13180)
Amoo Hesam [Thu, 22 Oct 2020 04:24:20 +0000 (07:54 +0330)]
Inform user of how disable SSH feature when installing using Docker (#13180)

3 years agoMore arc-green fixes (#13247)
silverwind [Thu, 22 Oct 2020 03:51:12 +0000 (05:51 +0200)]
More arc-green fixes (#13247)

- Fix various white borders
- Tweak basic button style to have more contrast
- Add more contrast to hover styles
- Invert Matrix webhook icon

May backport to 1.13.

Co-authored-by: zeripath <art27@cantab.net>
3 years agoDockerfile: Support socat use cases (#13208)
Begley Brothers (Development) [Thu, 22 Oct 2020 01:41:49 +0000 (12:41 +1100)]
Dockerfile: Support socat use cases (#13208)

* Dockerfile: Support socat use cases

In some contexts it is necessary to provide access to Gitea via TCP ports and unix sockets.
Gitea (`gitea web`) can be configured to listen for connections via unix-socket or TCP port, but not both.
When Gitea is installed to the host this limitation can be worked around by installing socat on the host.
When running Gitea from a container this limitation cannot be workaround.

Add socat to Gitea container.

* Removed version

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoEnhance release list (#6025)
Lanre Adelowo [Thu, 22 Oct 2020 00:55:25 +0000 (01:55 +0100)]
Enhance release list (#6025)

* show author for releases created outside Gitea UI.

Also show the number of commits behind the default branch for tags created outside the UI

don't show the tag date again for tags pushed to the repo. Since it is already on the sidebar and looks like duplication

* add migration for already existing tags

* update as per review

* fix build

* add space

* fix import statments

* Update models/migrations/v113.go

Co-Authored-By: zeripath <art27@cantab.net>
* Update models/migrations/v114.go

Co-authored-by: 6543 <6543@obermui.de>
* Update services/release/release.go

Co-authored-by: 6543 <6543@obermui.de>
* impruve

* remove dependency on models package

* Close the gitrepos in a defer to ensure that they are closed.

* gofmt

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoUpdate outdated label to use Fomantic UI style (#13181)
Iván Valdés [Wed, 21 Oct 2020 23:47:16 +0000 (16:47 -0700)]
Update outdated label to use Fomantic UI style (#13181)

* Update outdated label to use Fomantic UI style

* Use native labels rather than custom style

* Remove leading zero

Co-authored-by: zeripath <art27@cantab.net>
3 years agoFix initial commit page & binary munching problem (#13249)
zeripath [Wed, 21 Oct 2020 23:08:44 +0000 (00:08 +0100)]
Fix initial commit page & binary munching problem (#13249)

* Fix initial commit page

Unfortunately as a result of properly fixing ParsePatch the hack that
used git show <initial_commit_id> to get the diff for this failed.

This PR fixes this using the "super-secret" empty tree ref to make the
diff against.

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

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

Co-authored-by: 6543 <6543@obermui.de>
3 years agoAdd better error checking for inline html diff code (#13239)
mrsdizzie [Wed, 21 Oct 2020 22:14:44 +0000 (18:14 -0400)]
Add better error checking for inline html diff code (#13239)

* Add better error checking for inline html diff code

A better fix for #13191 which cleans up this code a bit and adds basic checking which should avoid writing broken HTML in future situations.

* Update gitdiff_test.go

* better regex

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoReplace footer and modal icons with SVG (#13245)
silverwind [Wed, 21 Oct 2020 21:07:33 +0000 (23:07 +0200)]
Replace footer and modal icons with SVG (#13245)

- Replace two font icons with SVG in the footer
- Replace icons in delete modals with SVG
- Horizontally center message text in modals

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 21 Oct 2020 20:00:31 +0000 (20:00 +0000)]
[skip ci] Updated translations via Crowdin

3 years agofix message key (#13240)
Iwasa Kazmi [Wed, 21 Oct 2020 19:59:12 +0000 (04:59 +0900)]
fix message key (#13240)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 21 Oct 2020 15:43:44 +0000 (15:43 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoadd more clarification to the issue-template.md (#13235)
zeripath [Wed, 21 Oct 2020 15:42:47 +0000 (16:42 +0100)]
add more clarification to the issue-template.md (#13235)

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agogo-version constraints ignore pre-releases (#13234)
zeripath [Wed, 21 Oct 2020 15:42:08 +0000 (16:42 +0100)]
go-version constraints ignore pre-releases (#13234)

Go-version constraints ignore pre-releases.

Rather than change the library further this PR simply changes
the git version comparison to use simple version compare ignoring the
issue of pre-releases.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 21 Oct 2020 11:03:31 +0000 (11:03 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoUpdate some JS dependencies (#13222)
silverwind [Wed, 21 Oct 2020 11:02:24 +0000 (13:02 +0200)]
Update some JS dependencies (#13222)

* Update some JS dependencies

- Update selective dependencies that are compatible with webpack 4. We
can not upgrade to webpack 5 yet because `license-webpack-plugin` is
incompatible.
- Enable a few new eslint rules and fix new issues

* fix comment

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
3 years agoReturn the full rejection message and errors in flash errors (#13221)
zeripath [Tue, 20 Oct 2020 23:50:10 +0000 (00:50 +0100)]
Return the full rejection message and errors in flash errors (#13221)

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoUpdate heatmap fixtures to restore tests (#13224)
6543 [Tue, 20 Oct 2020 22:39:25 +0000 (00:39 +0200)]
Update heatmap fixtures to restore tests (#13224)

* hotfix

* update ...

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 20 Oct 2020 18:19:29 +0000 (18:19 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoAdd review request api (#11355)
a1012112796 [Tue, 20 Oct 2020 18:18:25 +0000 (02:18 +0800)]
Add review request api (#11355)

* Add review request api

* add : POST /repos/{owner}/{repo}/pulls/{index}/requested_reviewers
* Remove : DELET /repos/{owner}/{repo}/pulls/{index}/requested_reviewers
* fix some request review bug
* block delet request review by models/DeleteReview()

Signed-off-by: a1012112796 <1012112796@qq.com>
* make fmt

* fix bug

* fix test code

* fix typo

* Apply suggestion from code review @jonasfranz

* fix swagger ref

* fix typo

Co-authored-by: Lauris BH <lauris@nix.lv>
* fix comment

* Change response message

* chang response so some simplfy

* Add ErrIllLegalReviewRequest
fix some nits

* make fmt

* Apply suggestions from code review

Co-authored-by: silverwind <me@silverwind.io>
* * Add team support
* fix test
* fix an known bug

* fix nit

* fix test

* Apply suggestions from code review

Co-authored-by: zeripath <art27@cantab.net>
* update get api and add test

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: zeripath <art27@cantab.net>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 20 Oct 2020 12:54:03 +0000 (12:54 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoWhen the git ref is unable to be found return broken pr (#13218)
zeripath [Tue, 20 Oct 2020 12:52:54 +0000 (13:52 +0100)]
When the git ref is unable to be found return broken pr (#13218)

Fix #13216

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoVarious arc-green fixes (#13214)
silverwind [Tue, 20 Oct 2020 05:22:10 +0000 (07:22 +0200)]
Various arc-green fixes (#13214)

- Style search dropdown
- Fix radio buttons and tweak checkboxes
- Add styling for error form elements
- Make borders brighter and focus more apparent
- Adjust comment box border color to match

Fixes: https://github.com/go-gitea/gitea/pull/12491
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoShow stale label for stale code comment which is marked as resolved (#13213)
a1012112796 [Tue, 20 Oct 2020 04:48:04 +0000 (12:48 +0800)]
Show stale label for stale code comment which is marked as resolved (#13213)

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
3 years agoMove install pages out of main macaron routes (#13195)
zeripath [Mon, 19 Oct 2020 21:03:08 +0000 (22:03 +0100)]
Move install pages out of main macaron routes (#13195)

* Move install pages out of main macaron loop

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update templates/post-install.tmpl

Co-authored-by: Lauris BH <lauris@nix.lv>
* remove prefetch

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years agoUse CSS Variables for fonts, remove postcss-loader (#13204)
silverwind [Mon, 19 Oct 2020 20:01:06 +0000 (22:01 +0200)]
Use CSS Variables for fonts, remove postcss-loader (#13204)

* Use CSS Variables for fonts, remove postcss-loader

- Use CSS variables for fonts, making the fonts easier to customize
- Remove postcss-loader, it's not doing anything useful and is actually
  applying strange transforms on our CSS.

Fixes: https://github.com/go-gitea/gitea/issues/11045
* introduce helper variable, mark documented vars

* work around case issue by always quoting specific fonts

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 19 Oct 2020 19:26:52 +0000 (19:26 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoAlign `SSH_AUTHORIZED_KEYS_BACKUP` var with the value in `app.ini` (#13212)
Patrick Schratz [Mon, 19 Oct 2020 19:25:32 +0000 (21:25 +0200)]
Align `SSH_AUTHORIZED_KEYS_BACKUP` var with the value in `app.ini` (#13212)

* Align `SSH_AUTHORIZED_KEYS_BACKUP` var with the value in `app.ini`

* Also fix the cheat sheet and move it to below - SSH_CREATE_AUTHORIZED_KEYS_FILE

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Andrew Thornton <art27@cantab.net>
3 years agoFix size and clickable area on file table back link (#13205)
silverwind [Sun, 18 Oct 2020 21:59:18 +0000 (23:59 +0200)]
Fix size and clickable area on file table back link (#13205)

Fixes: https://github.com/go-gitea/gitea/issues/13038
Should backport to 1.13.

3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 18 Oct 2020 17:52:36 +0000 (17:52 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoFix error in diff html rendering (#13191)
mrsdizzie [Sun, 18 Oct 2020 17:51:38 +0000 (12:51 -0500)]
Fix error in diff html rendering (#13191)

* Fix error in diff html rendering

Was missing an optional whitespace check in regex. Also noticed a rare case where diff.Type == Equal would be empty and thus get a newline attached. Fixed that too.

Fixes #13177

* Update services/gitdiff/gitdiff.go

Co-authored-by: zeripath <art27@cantab.net>
* Update gitdiff_test.go

* fmt

Co-authored-by: zeripath <art27@cantab.net>
3 years agoApply to become a maintainer (#13201)
a1012112796 [Sun, 18 Oct 2020 16:12:51 +0000 (00:12 +0800)]
Apply to become a maintainer (#13201)

Dear gitea's managers and contributors, I apply to become a
maintainer of gitea. I'm interested in this project and has
sent prs to gitea also. I will do more things to make gitea
better and reviw other contributors's pr in my free time.
Thanks.

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 years agoUpdate CHANGELOG.md (#13200)
a1012112796 [Sun, 18 Oct 2020 15:46:04 +0000 (23:46 +0800)]
Update CHANGELOG.md (#13200)

Co-authored-by: zeripath <art27@cantab.net>
3 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 18 Oct 2020 14:11:20 +0000 (14:11 +0000)]
[skip ci] Updated translations via Crowdin

3 years agoAdd git command error directory on log (#13194)
Lunny Xiao [Sun, 18 Oct 2020 14:10:11 +0000 (22:10 +0800)]
Add git command error directory on log (#13194)

3 years agoWhen handling errors in storageHandler check underlying error (#13178)
zeripath [Sun, 18 Oct 2020 01:29:06 +0000 (02:29 +0100)]
When handling errors in storageHandler check underlying error (#13178)

Unfortunately there was a mistake in #13164 which fails to handle
os.PathError wrapping an os.ErrNotExist

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoRemove not relevant option from issue template (#13188)
mrsdizzie [Sat, 17 Oct 2020 15:46:59 +0000 (10:46 -0500)]
Remove not relevant option from issue template (#13188)

Almost every use of "Not relevant" I see is the opposite -- it is relevant to have an example on try.gitea.io and often we can't do anything until the user provides one. Remove the not-relevant option so people have to decide yes/no if they are going to attempt to reproduce it which will hopefully encourage them to do so in simple cases.

For actual not-relevant issues No should be a fine answer as well as it would be clear to us when you can't reproduce an example there.

Hopefully this will encourage more examples when people file issues which would lead to quicker fixes.

4 years ago[Refactor] Move APIFormat functions into convert package (#12856)
6543 [Sat, 17 Oct 2020 04:23:08 +0000 (06:23 +0200)]
[Refactor] Move APIFormat functions into convert package (#12856)

* USER APIFormat -> ToUser

* Migrate more and mark APIFormat deprecated

* models.Comment APIFormat() -> convert.ToComment

* models.Release APIFormat() -> convert.ToRelease

* models.Attachments APIFormat() -> convert.ToReleaseAttachments

* models.CommitStatus APIFormat() -> convert.ToCommitStatus

* finish migration to convert.ToUser

* Move Test

* Imprufe Test

* fix test

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 16 Oct 2020 17:14:34 +0000 (17:14 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix diff skipping lines (#13154)
zeripath [Fri, 16 Oct 2020 17:13:18 +0000 (18:13 +0100)]
Fix diff skipping lines (#13154)

* Fix diff skipping lines

ParsePatch previously just skipped all lines that start with "+++ " or "--- "
and makes no attempt to see these lines in context.

This PR rewrites ParsePatch to pay attention to context and position
within a patch, ensuring that --- and +++ are only skipped if
appropriate.

This PR also fixes several issues with incomplete files.

Fix https://codeberg.org/Codeberg/Community/issues/308
Fix #13153

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

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

* simplify error handling

Signed-off-by: Andrew Thornton <art27@cantab.net>
* never return io.EOF

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoUpdate go-version v1.2.3 -> v1.2.4 (#13169)
6543 [Fri, 16 Oct 2020 09:05:02 +0000 (11:05 +0200)]
Update go-version v1.2.3 -> v1.2.4 (#13169)

Co-authored-by: zeripath <art27@cantab.net>
4 years agoVendor Update Go Libs (#13166)
6543 [Fri, 16 Oct 2020 05:06:27 +0000 (07:06 +0200)]
Vendor Update Go Libs (#13166)

* update github.com/alecthomas/chroma v0.8.0 -> v0.8.1

* github.com/blevesearch/bleve v1.0.10 -> v1.0.12

* editorconfig-core-go v2.1.1 -> v2.3.7

* github.com/gliderlabs/ssh v0.2.2 -> v0.3.1

* migrate editorconfig.ParseBytes to Parse

* github.com/shurcooL/vfsgen to 0d455de96546

* github.com/go-git/go-git/v5 v5.1.0 -> v5.2.0

* github.com/google/uuid v1.1.1 -> v1.1.2

* github.com/huandu/xstrings v1.3.0 -> v1.3.2

* github.com/klauspost/compress v1.10.11 -> v1.11.1

* github.com/markbates/goth v1.61.2 -> v1.65.0

* github.com/mattn/go-sqlite3 v1.14.0 -> v1.14.4

* github.com/mholt/archiver v3.3.0 -> v3.3.2

* github.com/microcosm-cc/bluemonday 4f7140c49acb -> v1.0.4

* github.com/minio/minio-go v7.0.4 -> v7.0.5

* github.com/olivere/elastic v7.0.9 -> v7.0.20

* github.com/urfave/cli v1.20.0 -> v1.22.4

* github.com/prometheus/client_golang v1.1.0 -> v1.8.0

* github.com/xanzy/go-gitlab v0.37.0 -> v0.38.1

* mvdan.cc/xurls v2.1.0 -> v2.2.0

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoPrevent panics with missing storage (#13164)
zeripath [Fri, 16 Oct 2020 03:51:06 +0000 (04:51 +0100)]
Prevent panics with missing storage (#13164)

* The `.Use` of storageHandler before setting up the template renderer
causes a panic if there is an error to log.
* The error passed to `ctx.Error` in that case may contain sensitive
information and should not be rendered to the end user. We should
instead log the error and render a simple error message.
* There is no handling of missing avatars and this needs a 404. Minio
errors need to be mapped to standard golang errors such as
os.ErrNotExist.
* There is no logging when storage is set up.

Related #13159

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoImprove users management through the CLI (#6001) (#10492)
ydelafollye [Fri, 16 Oct 2020 02:48:38 +0000 (22:48 -0400)]
Improve users management through the CLI (#6001) (#10492)

* Fix images in wiki edit preview (#11546)

Make sure wiki editor sets wiki to true so gitea renders it as a wiki page.

Also change the context data attr for edit form. This looks wrong but everywhere else in our code assumes the urlPrefix to be just the repo url when rendering and manually adds /wiki to the rendered url regardless.

Fixes #11540

4 years agoChange order of possible-owner organizations to alphabetical (#13160)
Elena Neuschild [Thu, 15 Oct 2020 22:15:55 +0000 (00:15 +0200)]
Change order of possible-owner organizations to alphabetical (#13160)

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoSlightly simplify the queue settings code to help reduce the risk of problems (#12976)
zeripath [Thu, 15 Oct 2020 21:40:03 +0000 (22:40 +0100)]
Slightly simplify the queue settings code to help reduce the risk of problems (#12976)

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago[Vendor] Update go-ldap to v3.2.4 (#13163)
6543 [Thu, 15 Oct 2020 19:27:33 +0000 (21:27 +0200)]
[Vendor] Update go-ldap to v3.2.4 (#13163)

* [Vendor] update go-ldap to v3.0.3

* update go-ldap to v3.2.4

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 15 Oct 2020 18:31:29 +0000 (18:31 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoUpdate external-renderers.en-us.md (#13165)
Johan Van de Wauw [Thu, 15 Oct 2020 18:30:25 +0000 (20:30 +0200)]
Update external-renderers.en-us.md (#13165)

Alpine 3.12 (the version used by current master) no longer provides the python-dev package:
https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.12.0#python2_no_longer_provides_python_and_python-devel

As the next steps explicitely use python3 it is not needed anyway.

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 15 Oct 2020 09:49:02 +0000 (09:49 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoEnhance config cheat sheet on passwd quoting (#13158)
Robin [Thu, 15 Oct 2020 09:48:00 +0000 (11:48 +0200)]
Enhance config cheat sheet on passwd quoting (#13158)

See #13126

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 15 Oct 2020 08:18:52 +0000 (08:18 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoShow outdated comments in pull request (#13148)
Iván Valdés [Thu, 15 Oct 2020 08:17:48 +0000 (01:17 -0700)]
Show outdated comments in pull request (#13148)

Co-authored-by: zeripath <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 15 Oct 2020 04:15:26 +0000 (04:15 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoUse GO variable in go-check target (#13146) (#13147)
E14 [Thu, 15 Oct 2020 04:14:22 +0000 (06:14 +0200)]
Use GO variable in go-check target (#13146) (#13147)

4 years ago[skip ci] Updated translations via Crowdin v1.14.0-dev
GiteaBot [Wed, 14 Oct 2020 21:45:21 +0000 (21:45 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoClean up mysql service in drone (#13145)
techknowlogick [Wed, 14 Oct 2020 21:44:18 +0000 (17:44 -0400)]
Clean up mysql service in drone (#13145)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 14 Oct 2020 18:49:08 +0000 (18:49 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoChangelog v1.13.0-RC1 (#13142)
6543 [Wed, 14 Oct 2020 18:48:03 +0000 (20:48 +0200)]
Changelog v1.13.0-RC1 (#13142)

* Changelog v1.13.0

* reorder topics

* impruve

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Goldmark ...

* Add 12516

* Apply suggestions from code review

* Update CHANGELOG.md

* Apply suggestions from code review

Co-authored-by: techknowlogick <matti@mdranta.net>
* Apply suggestions from code review

Co-authored-by: zeripath <art27@cantab.net>
* Update CHANGELOG.md

* Apply suggestions from code review

Co-authored-by: 6543 <6543@obermui.de>
* Securety is more importand than Breaking ...

Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: zeripath <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 14 Oct 2020 17:02:15 +0000 (17:02 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoUpdate sshd_config (#13143)
Anders Eurenius Runvald [Wed, 14 Oct 2020 17:01:11 +0000 (19:01 +0200)]
Update sshd_config (#13143)

Afaik, adding these lines does nothing unless the file(s) are present. Having them in let's admins supply certs instead of relying on TOFU.

Co-authored-by: zeripath <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 14 Oct 2020 13:09:05 +0000 (13:09 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoAvatars and Repo avatars support storing in minio (#12516)
Lunny Xiao [Wed, 14 Oct 2020 13:07:51 +0000 (21:07 +0800)]
Avatars and Repo avatars support storing in minio (#12516)

* Avatar support minio

* Support repo avatar minio storage

* Add missing migration

* Fix bug

* Fix test

* Add test for minio store type on avatars and repo avatars; Add documents

* Fix bug

* Fix bug

* Add back missed avatar link method

* refactor codes

* Simplify the codes

* Code improvements

* Fix lint

* Fix test mysql

* Fix test mysql

* Fix test mysql

* Fix settings

* Fix test

* fix test

* Fix bug

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 14 Oct 2020 12:12:40 +0000 (12:12 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoShow original author's reviews on pull summary box (#13127)
赵智超 [Wed, 14 Oct 2020 12:11:11 +0000 (20:11 +0800)]
Show original author's reviews on pull summary box (#13127)

follow #12039, show original author's reviews by other way.
fix #11705.

Signed-off-by: a1012112796 <1012112796@qq.com>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 14 Oct 2020 11:18:41 +0000 (11:18 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix punctuation in trust model description (#13140)
Lauris BH [Wed, 14 Oct 2020 11:17:40 +0000 (14:17 +0300)]
Fix punctuation in trust model description (#13140)

4 years agoFinally fix diff names (#13136)
zeripath [Wed, 14 Oct 2020 04:49:33 +0000 (05:49 +0100)]
Finally fix diff names (#13136)

* Finally fix diff names

#12771 attempted to fix diff by avoiding the git diff line as
it is possible to have an ambiguous line here.

#12254 attempted to fix diff by assuming that names would quoted
if they needed to be and if one was quoted then both would be.

Both of these were wrong.

I have now discovered `--src-prefix` and `--dst-prefix` which
means that we can set this in such a way to force the git diff
to always be unambiguous.

Therefore this PR rollsback most of the changes in #12771 and
uses these options to fix this.

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

* Update services/gitdiff/gitdiff.go

* Update modules/repofiles/temp_repo.go

* fix test

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 [Wed, 14 Oct 2020 04:07:05 +0000 (04:07 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoGitea 2 Gitea migration (#12657)
6543 [Wed, 14 Oct 2020 04:06:00 +0000 (06:06 +0200)]
Gitea 2 Gitea migration (#12657)

* first draft

* update gitea sdk to 9e280adb4da

* adapt feat of updated sdk

* releases now works

* break the Reactions loop

* use convertGiteaLabel

* fix endless loop because paggination is not supported there !!!

* rename gitea local uploader files

* pagination can bite you in the ass

* Version Checks

* lint

* docs

* rename gitea sdk import to miss future conficts

* go-swagger: dont scan the sdk structs

* make sure gitea can shutdown gracefully

* make GetPullRequests and GetIssues similar

* rm useles

* Add Test: started ...

* ... add tests ...

* Add tests and Fixing things

* Workaround missing SHA

* Adapt: Ensure that all migration requests are cancellable
(714ab71ddc4260937b1480519d453d2dc4e77dd6)

* LINT: fix misspells in test set

* adapt ListMergeRequestAwardEmoji

* update sdk

* Return error when creating giteadownloader failed

* update sdk

* adapt new sdk

* adopt new features

* check version before err

* adapt: 'migrate service type switch page'

* optimize

* Fix DefaultBranch

* impruve

* handle subPath

* fix test

* Fix ReviewCommentPosition

* test GetReviews

* add DefaultBranch int test set

* rm unused

* Update SDK to v0.13.0

* addopt sdk changes

* found better link

* format template

* Update Docs

* Update Gitea SDK (v0.13.1)

4 years ago[Enhancement] Allow admin to merge pr with protected file changes (#12078)
赵智超 [Tue, 13 Oct 2020 18:50:57 +0000 (02:50 +0800)]
[Enhancement] Allow admin to merge pr with protected file changes (#12078)

* [Enhancement] Allow admin to merge pr with protected file changes

As tilte, show protected message in diff page and merge box.

Signed-off-by: a1012112796 <1012112796@qq.com>
* remove unused ver

* Update options/locale/locale_en-US.ini

Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
* Add TrN

* Apply suggestions from code review

* fix lint

* Update options/locale/locale_en-US.ini

Co-authored-by: zeripath <art27@cantab.net>
* Apply suggestions from code review

* move pr proteced files check to TestPatch
* Call TestPatch when protected branches settings changed

* Apply review suggestion @CirnoT

* move to service @lunny

* slightly restructure routers/private/hook.go

Adds a lot of comments and simplifies the logic

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

Signed-off-by: Andrew Thornton <art27@cantab.net>
* skip duplicate protected files check

* fix check logic

* slight refactor of TestPatch

Signed-off-by: Andrew Thornton <art27@cantab.net>
* When checking for protected files changes in TestPatch use the temporary repository

Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix introduced issue with hook

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove the check on PR index being greater than 0 as it unnecessary

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 13 Oct 2020 16:25:13 +0000 (16:25 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoMove update-server-info to hooks (#12826)
zeripath [Tue, 13 Oct 2020 16:24:06 +0000 (17:24 +0100)]
Move update-server-info to hooks (#12826)

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoAdd API Section to Changelog (#13125)
6543 [Tue, 13 Oct 2020 05:39:17 +0000 (07:39 +0200)]
Add API Section to Changelog (#13125)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoProvide self-registering storage system (#12978)
zeripath [Tue, 13 Oct 2020 03:58:34 +0000 (04:58 +0100)]
Provide self-registering storage system (#12978)

* Provide self-registering storage system

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

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove old strings from setting

Signed-off-by: Andrew Thornton <art27@cantab.net>
* oops attachments not attachment

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years ago[API] If User is Admin, show 500 error message on PROD mode too (#13115)
6543 [Tue, 13 Oct 2020 00:41:49 +0000 (02:41 +0200)]
[API] If User is Admin, show 500 error message on PROD mode too (#13115)

* API: show admin 500 error message on PROD mode too

* a nit

* dont miss InternalServerError

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoSave TimeStamps for Star, Label, Follow, Watch and Collaboration to Database (#13124)
6543 [Tue, 13 Oct 2020 00:01:57 +0000 (02:01 +0200)]
Save TimeStamps for Star, Label, Follow, Watch and Collaboration to Database (#13124)

* Add timestamps to Star, Label, LanguageStat, Follow, Watch and Collaboration

* Star do not need updated

* LanguageStat do not need update (they wont change)

* fix unit-test

4 years agoReturn 404 not 500 from API if team does not exist (#13118)
zeripath [Mon, 12 Oct 2020 21:09:21 +0000 (22:09 +0100)]
Return 404 not 500 from API if team does not exist (#13118)

If team does not exist expect ErrTeamNotExist not ErrUserNotEXist

Fix #11336

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years agoAdd team support for review request (#12039)
赵智超 [Mon, 12 Oct 2020 19:55:13 +0000 (03:55 +0800)]
Add team support for review request (#12039)

Add team support for review request

Block #11355

Signed-off-by: a1012112796 <1012112796@qq.com>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Andrew Thornton <art27@cantab.net>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 12 Oct 2020 18:45:03 +0000 (18:45 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix args in tasks.json (#13116)
Elena Neuschild [Mon, 12 Oct 2020 18:44:01 +0000 (20:44 +0200)]
Fix args in tasks.json (#13116)

4 years agoProhibit automatic downgrades (#13108)
6543 [Mon, 12 Oct 2020 14:35:56 +0000 (16:35 +0200)]
Prohibit automatic downgrades (#13108)

Prohibit automatic downgrades by checking the version of the db and warning if the version number should be lower.

Close #13107

Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
4 years agoImprove error feedback for duplicate deploy keys (#13112)
Chris Shyi [Mon, 12 Oct 2020 13:44:56 +0000 (21:44 +0800)]
Improve error feedback for duplicate deploy keys (#13112)

Instead of a generic HTTP 500 error page, a flash message is rendered with the deploy key page template to inform the user that a key with the intended title already exists.

Fixes #13110

4 years agochore: update minio image version (#13109)
wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf [Mon, 12 Oct 2020 08:45:20 +0000 (10:45 +0200)]
chore: update minio image version (#13109)

* 2020-05-16 --> 2020-10-09

4 years ago4 line diff (#13103)
6543 [Mon, 12 Oct 2020 01:15:15 +0000 (03:15 +0200)]
4 line diff (#13103)

4 years agoUpdate golangci-lint to version 1.31.0 (#13102)
kolaente [Sun, 11 Oct 2020 20:27:20 +0000 (22:27 +0200)]
Update golangci-lint to version 1.31.0 (#13102)

This PR updates golangci-lint to the latest version 1.31.0.

The upgrade introduced a new check for which I've fixed or disabled most cases.

Signed-off-by: kolaente <k@knt.li>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 11 Oct 2020 18:52:13 +0000 (18:52 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoLog the underlying panic in runMigrateTask (#13096)
zeripath [Sun, 11 Oct 2020 18:51:13 +0000 (19:51 +0100)]
Log the underlying panic in runMigrateTask (#13096)

If there is a panic during runMigrateTask we should capture and log the underlying
panic error.

This PR ensures that the panic is logged and captured as part of the task message.

Fix #13095

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoAdd ssh certificate support (#12281)
Wim [Sun, 11 Oct 2020 00:38:09 +0000 (02:38 +0200)]
Add ssh certificate support (#12281)

* Add ssh certificate support

* Add ssh certificate support to builtin ssh

* Write trusted-user-ca-keys.pem based on configuration

* Update app.example.ini

* Update templates/user/settings/keys_principal.tmpl

Co-authored-by: silverwind <me@silverwind.io>
* Remove unused locale string

* Update options/locale/locale_en-US.ini

Co-authored-by: silverwind <me@silverwind.io>
* Update options/locale/locale_en-US.ini

Co-authored-by: silverwind <me@silverwind.io>
* Update models/ssh_key.go

Co-authored-by: silverwind <me@silverwind.io>
* Add missing creation of SSH.Rootpath

* Update cheatsheet, example and locale strings

* Update models/ssh_key.go

Co-authored-by: zeripath <art27@cantab.net>
* Update models/ssh_key.go

Co-authored-by: zeripath <art27@cantab.net>
* Update models/ssh_key.go

Co-authored-by: zeripath <art27@cantab.net>
* Update models/ssh_key.go

Co-authored-by: zeripath <art27@cantab.net>
* Update models/ssh_key.go

* Optimizations based on feedback

* Validate CA keys for external sshd

* Add filename option and change default filename

Add a SSH_TRUSTED_USER_CA_KEYS_FILENAME option which default is
RUN_USER/.ssh/gitea-trusted-user-ca-keys.pem

Do not write a file when SSH_TRUSTED_USER_CA_KEYS is empty.

Add some more documentation.

* Remove unneeded principalkey functions

* Add blank line

* Apply suggestions from code review

Co-authored-by: zeripath <art27@cantab.net>
* Add SSH_AUTHORIZED_PRINCIPALS_ALLOW option

This adds a SSH_AUTHORIZED_PRINCIPALS_ALLOW which is default
email,username this means that users only can add the principals
that match their email or username.

To allow anything the admin need to set the option anything.

This allows for a safe default in gitea which protects against malicious
users using other user's prinicipals. (before that user could set it).

This commit also has some small other fixes from the last code review.

* Rewrite principal keys file on user deletion

* Use correct rewrite method

* Set correct AuthorizedPrincipalsBackup default setting

* Rewrite principalsfile when adding principals

* Add update authorized_principals option to admin dashboard

* Handle non-primary emails

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add the command actually to the dashboard template

* Update models/ssh_key.go

Co-authored-by: silverwind <me@silverwind.io>
* By default do not show principal options unless there are CA keys set or they are explicitly set

Signed-off-by: Andrew Thornton <art27@cantab.net>
* allow settings when enabled

* Fix typos in TrustedUserCAKeys path

* Allow every CASignatureAlgorithms algorithm

As this depends on the content of TrustedUserCAKeys we should allow all
signature algorithms as admins can choose the specific algorithm on their
signing CA

* Update models/ssh_key.go

Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix linting issue

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years agoFix attachments list in edit comment (#13036)
zeripath [Sat, 10 Oct 2020 23:49:59 +0000 (00:49 +0100)]
Fix attachments list in edit comment (#13036)

#11141 broke the appearance of dropzone attachments when editting
comments causing poorly updating lists.

This PR fixes this.

Fix #12583

Signed-off-by: Andrew Thornton art27@cantab.net
4 years agoFix deadlock when deleting team user (#13092)
zeripath [Sat, 10 Oct 2020 19:48:58 +0000 (20:48 +0100)]
Fix deadlock when deleting team user (#13092)

`models.getUserRepoPermission(...)` calls `HasOrgVisible` which
uses `models.x` potentially outside of the transaction `e` provided
as an argument to `getUserRepoPermission`.

This PR switches to use `hasOrgVisible(e, ...)`.

Fix #12983

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years agoChange default log configuration (#13088)
zeripath [Sat, 10 Oct 2020 15:19:50 +0000 (16:19 +0100)]
Change default log configuration (#13088)

* Change default log configuration

This PR changes the install page and the docker default
logging configuration to match the suggested configuration
that I repeatedly end up suggesting on issues.

It further improves the logging configuration docs to
recommend specific instructions for how to configure logs
for posting to issues.

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update docs/content/doc/advanced/logging-documentation.en-us.md