summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Keep database transactions not too big (#13254)Lunny Xiao2020-10-221-41/+40
| | | | | | | | | | | | | * 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>
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-221-1/+1
|
* Migrations: Gitea should not fail just because of no apiConfig return (#13229)65432020-10-221-6/+7
| | | | | | | | | | | | * 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>
* Inform user of how disable SSH feature when installing using Docker (#13180)Amoo Hesam2020-10-221-1/+1
|
* More arc-green fixes (#13247)silverwind2020-10-211-38/+57
| | | | | | | | | | - 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>
* Dockerfile: Support socat use cases (#13208)Begley Brothers (Development)2020-10-211-0/+1
| | | | | | | | | | | | | | * 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>
* Enhance release list (#6025)Lanre Adelowo2020-10-215-0/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Update outdated label to use Fomantic UI style (#13181)Iván Valdés2020-10-215-38/+16
| | | | | | | | | * 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>
* Fix initial commit page & binary munching problem (#13249)zeripath2020-10-211-1/+10
| | | | | | | | | | | | | | | | | | | * 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>
* Add better error checking for inline html diff code (#13239)mrsdizzie2020-10-212-48/+44
| | | | | | | | | | | * 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>
* Replace footer and modal icons with SVG (#13245)silverwind2020-10-2132-34/+51
| | | | | - Replace two font icons with SVG in the footer - Replace icons in delete modals with SVG - Horizontally center message text in modals
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-211-0/+32
|
* fix message key (#13240)Iwasa Kazmi2020-10-211-2/+2
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-211-2/+22
|
* add more clarification to the issue-template.md (#13235)zeripath2020-10-211-0/+6
| | | | | Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* go-version constraints ignore pre-releases (#13234)zeripath2020-10-2112-25/+25
| | | | | | | | | 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>
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-2126-94/+65
|
* Update some JS dependencies (#13222)silverwind2020-10-216-697/+878
| | | | | | | | | | | | | * 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>
* Return the full rejection message and errors in flash errors (#13221)zeripath2020-10-209-25/+128
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update heatmap fixtures to restore tests (#13224)65432020-10-203-3/+3
| | | | | * hotfix * update ...
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-202-0/+35
|
* Add review request api (#11355)a10121127962020-10-2021-171/+694
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-201-0/+1
|
* When the git ref is unable to be found return broken pr (#13218)zeripath2020-10-201-1/+1
| | | | | Fix #13216 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Various arc-green fixes (#13214)silverwind2020-10-201-45/+126
| | | | | | | | | | | | - 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>
* Show stale label for stale code comment which is marked as resolved (#13213)a10121127962020-10-201-1/+1
| | | | | Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Move install pages out of main macaron routes (#13195)zeripath2020-10-1910-109/+228
| | | | | | | | | | | | | * 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>
* Use CSS Variables for fonts, remove postcss-loader (#13204)silverwind2020-10-1910-662/+123
| | | | | | | | | | | | | * 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
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-192-11/+39
|
* Align `SSH_AUTHORIZED_KEYS_BACKUP` var with the value in `app.ini` (#13212)Patrick Schratz2020-10-192-2/+2
| | | | | | | | | * 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>
* Fix size and clickable area on file table back link (#13205)silverwind2020-10-191-0/+7
| | | | | Fixes: https://github.com/go-gitea/gitea/issues/13038 Should backport to 1.13.
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-181-1/+2
|
* Fix error in diff html rendering (#13191)mrsdizzie2020-10-182-3/+12
| | | | | | | | | | | | | | | | | * 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>
* Apply to become a maintainer (#13201)a10121127962020-10-181-0/+1
| | | | | | | | | | | 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>
* Update CHANGELOG.md (#13200)a10121127962020-10-181-1/+1
| | | Co-authored-by: zeripath <art27@cantab.net>
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-181-3/+9
|
* Add git command error directory on log (#13194)Lunny Xiao2020-10-181-1/+1
|
* When handling errors in storageHandler check underlying error (#13178)zeripath2020-10-172-3/+4
| | | | | | | | 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>
* Remove not relevant option from issue template (#13188)mrsdizzie2020-10-171-1/+0
| | | | | | | 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.
* [Refactor] Move APIFormat functions into convert package (#12856)65432020-10-1728-208/+234
| | | | | | | | | | | | | | | | | | | | | | | * 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>
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-161-1/+3
|
* Fix diff skipping lines (#13154)zeripath2020-10-162-182/+348
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Update go-version v1.2.3 -> v1.2.4 (#13169)65432020-10-166-11/+17
| | | Co-authored-by: zeripath <art27@cantab.net>
* Vendor Update Go Libs (#13166)65432020-10-16656-24180/+51918
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Prevent panics with missing storage (#13164)zeripath2020-10-154-19/+64
| | | | | | | | | | | | | | | | * 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>
* Improve users management through the CLI (#6001) (#10492)ydelafollye2020-10-153-24/+121
| | | | | | | | | | * 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
* Change order of possible-owner organizations to alphabetical (#13160)Elena Neuschild2020-10-151-1/+2
| | | | Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Slightly simplify the queue settings code to help reduce the risk of ↵zeripath2020-10-153-28/+46
| | | | | | | problems (#12976) Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [Vendor] Update go-ldap to v3.2.4 (#13163)65432020-10-1565-1347/+2744
| | | | | | | * [Vendor] update go-ldap to v3.0.3 * update go-ldap to v3.2.4 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [skip ci] Updated translations via CrowdinGiteaBot2020-10-153-1/+3
|