Commit Graph

10595 Commits

Author SHA1 Message Date
GiteaBot 70cb9e38e2 [skip ci] Updated translations via Crowdin 2020-10-20 18:19:29 +00:00
a1012112796 b9850375fc
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>
2020-10-20 14:18:25 -04:00
GiteaBot b50448b286 [skip ci] Updated translations via Crowdin 2020-10-20 12:54:03 +00:00
zeripath 0aec2a294b
When the git ref is unable to be found return broken pr (#13218)
Fix #13216

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-10-20 20:52:54 +08:00
silverwind 5626811e52
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>
2020-10-20 01:22:10 -04:00
a1012112796 1b07db7922
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>
2020-10-20 00:48:04 -04:00
zeripath 2f1353a2f3
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>
2020-10-19 17:03:08 -04:00
silverwind 3ddf3f93d6
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
2020-10-19 16:01:06 -04:00
GiteaBot d67172b136 [skip ci] Updated translations via Crowdin 2020-10-19 19:26:52 +00:00
Patrick Schratz 05aa6fd477
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>
2020-10-19 15:25:32 -04:00
silverwind 06eaf74e8a
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.
2020-10-19 00:59:18 +03:00
GiteaBot 40779938a9 [skip ci] Updated translations via Crowdin 2020-10-18 17:52:36 +00:00
mrsdizzie 9fe4b7b692
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>
2020-10-18 13:51:38 -04:00
a1012112796 5e34d3d2c0
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>
2020-10-18 12:12:51 -04:00
a1012112796 4099a18ed2
Update CHANGELOG.md (#13200)
Co-authored-by: zeripath <art27@cantab.net>
2020-10-18 18:46:04 +03:00
GiteaBot 27687fa4f0 [skip ci] Updated translations via Crowdin 2020-10-18 14:11:20 +00:00
Lunny Xiao 25f937f99b
Add git command error directory on log (#13194) 2020-10-18 17:10:11 +03:00
zeripath 25b7766673
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>
2020-10-17 21:29:06 -04:00
mrsdizzie 4cc8697a65
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.
2020-10-17 23:46:59 +08:00
6543 d453533beb
[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>
2020-10-17 00:23:08 -04:00
GiteaBot 131278ff22 [skip ci] Updated translations via Crowdin 2020-10-16 17:14:34 +00:00
zeripath 6bab678bed
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>
2020-10-16 13:13:18 -04:00
6543 b222dbc1d1
Update go-version v1.2.3 -> v1.2.4 (#13169)
Co-authored-by: zeripath <art27@cantab.net>
2020-10-16 12:05:02 +03:00
6543 12a1f914f4
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>
2020-10-16 01:06:27 -04:00
zeripath 91f2afdb54
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>
2020-10-15 23:51:06 -04:00
ydelafollye cb171dbd56
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
2020-10-15 22:48:38 -04:00
Elena Neuschild 4fbe64572c
Change order of possible-owner organizations to alphabetical (#13160)
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-10-15 18:15:55 -04:00
zeripath c8f7a6b774
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>
2020-10-15 17:40:03 -04:00
6543 e374bb7e2d
[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>
2020-10-15 15:27:33 -04:00
GiteaBot bcf45bb162 [skip ci] Updated translations via Crowdin 2020-10-15 18:31:29 +00:00
Johan Van de Wauw 923f57856a
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.
2020-10-15 19:30:25 +01:00
GiteaBot 25f7e1c50b [skip ci] Updated translations via Crowdin 2020-10-15 09:49:02 +00:00
Robin 27b7add2f8
Enhance config cheat sheet on passwd quoting (#13158)
See #13126
2020-10-15 10:48:00 +01:00
GiteaBot deb0333c96 [skip ci] Updated translations via Crowdin 2020-10-15 08:18:52 +00:00
Iván Valdés 05c7e58742
Show outdated comments in pull request (#13148)
Co-authored-by: zeripath <art27@cantab.net>
2020-10-15 11:17:48 +03:00
GiteaBot bfb3333528 [skip ci] Updated translations via Crowdin 2020-10-15 04:15:26 +00:00
E14 c962518cc2
Use GO variable in go-check target (#13146) (#13147) 2020-10-15 12:14:22 +08:00
GiteaBot e4a3785218 [skip ci] Updated translations via Crowdin 2020-10-14 21:45:21 +00:00
techknowlogick 76ac83402b
Clean up mysql service in drone (#13145) 2020-10-14 17:44:18 -04:00
GiteaBot 07c9f6dca4 [skip ci] Updated translations via Crowdin 2020-10-14 18:49:08 +00:00
6543 33e0e37537
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>
2020-10-14 14:48:03 -04:00
GiteaBot 8fa74045c4 [skip ci] Updated translations via Crowdin 2020-10-14 17:02:15 +00:00
Anders Eurenius Runvald 01f991ac88
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>
2020-10-14 13:01:11 -04:00
GiteaBot 36e41d4764 [skip ci] Updated translations via Crowdin 2020-10-14 13:09:05 +00:00
Lunny Xiao 80a6b0f5bc
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
2020-10-14 21:07:51 +08:00
GiteaBot 93f7525061 [skip ci] Updated translations via Crowdin 2020-10-14 12:12:40 +00:00
赵智超 97980146c5
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>
2020-10-14 13:11:11 +01:00
GiteaBot e70df67d47 [skip ci] Updated translations via Crowdin 2020-10-14 11:18:41 +00:00
Lauris BH a2a05d164b
Fix punctuation in trust model description (#13140) 2020-10-14 14:17:40 +03:00
zeripath edfebe65b1
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>
2020-10-14 07:49:33 +03:00