summaryrefslogtreecommitdiffstats
path: root/modules
Commit message (Collapse)AuthorAgeFilesLines
* Add cron running API (#12421)zeripath2020-08-241-0/+16
| | | | | | | | | | | | | | | | | | | * Add cron running API Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review * placate-swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * return not found Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix emoji replacements, make emoji images consistent (#12567)silverwind2020-08-233-2/+3
| | | | | | | - Fix emoji not being replaced in issue title change text - Make the image attributes consistent, add alt, remove align Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Initial support for push options (#12169)John Olheiser2020-08-232-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial support for push options Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix misspelling 🤦 Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix formatting after conflict resolution * defer close git repo * According the GitLab documentation, git >= 2.10 Signed-off-by: jolheiser <john.olheiser@gmail.com> * Words are hard. Thanks @mrsdizzie :sweat_smile: Co-authored-by: mrsdizzie <info@mrsdizzie.com> * Only update if there are push options Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: mrsdizzie <info@mrsdizzie.com>
* Add email notify for new release (#12463)赵智超2020-08-231-0/+13
| | | | | | * Add email notify for new release Signed-off-by: a1012112796 <1012112796@qq.com>
* Ensure that the detected charset order is set in chardet test (#12574)zeripath2020-08-231-5/+23
| | | | | | | | | | | | | | | TestToUTF8WithFallback is the cause of recurrent spurious test failures even despite code to set the detected charset order. The reason why this happens is because the preferred detected charset order is not being initialised for these tests. This PR simply ensures that this is set at the start of each test and would allow different tests to be written to allow differing orders. Replaces #12571 Close #12571 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Set utf8mb4 as the default charset on MySQL if CHARSET is unset (#12563)zeripath2020-08-221-1/+3
| | | | | | | | | | | | MySQL in its infinite wisdom determines that UTF8 does not mean UTF8. Our install scripts know about this and will set CHARSET to utf8mb4 if we users choose this but... users who do not explicitly set this variable will default to utf8mb3 without knowing it. This PR changes the unset CHARSET value to utf8mb4 if users choose to use mysql. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Skip SSPI authentication attempts for /api/internal (#12556)zeripath2020-08-223-1/+8
| | | | | | | | | | | | | | | * Skip SSPI authentication attempts for /api/internal SSPI fails badly on authentication attempts to /api/internal which it can never succesfully authenticate. Fix #11260 Signed-off-by: Andrew Thornton <art27@cantab.net> * Update oauth2.go Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Disable password complexity check default (#12557)mrsdizzie2020-08-211-0/+3
| | | | | | | * Disable password complexity check default These features enourange bad passwords/are annoying for people using better password methods, and at minimum we shouldn't force that as a default for obvious reasons. Disable any default check to avoid regular complaints. * fix copy paste format
* fix typos (#12545)Success2020-08-201-1/+1
| | | | | | | * fix typo in app.ini * fix typo in git hook module Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Default empty merger list to those with write permissions (#12535)zeripath2020-08-201-1/+5
| | | | | Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Remove hardcoded ES indexername (#12521)Wim2020-08-181-1/+1
|
* change PIDFile default from /var/run/gitea.pid to /run/gitea.pid (#12500)Florian Klink2020-08-181-1/+1
| | | | | | | | | | | | | | | | | | * docs: update heading This section covers more paths than the 3 listed in the heading. * setting: change PIDFile default from /var/run/gitea.pid to /run/gitea.pid On most modern distributions, /var/run is deprecated and only kept for backwards compat according to https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s13.html, and is a symlink to `/run/` on modern distributions. Old Distros that still don't have `/run` can update the gitea default as described in from-source.en-us.md to point to the old location. Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add a storage layer for attachments (#11387)Lunny Xiao2020-08-187-30/+323
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a storage layer for attachments * Fix some bug * fix test * Fix copyright head and lint * Fix bug * Add setting for minio and flags for migrate-storage * Add documents * fix lint * Add test for minio store type on attachments * fix test * fix test * Apply suggestions from code review Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> * Add warning when storage migrated successfully * Fix drone * fix test * rebase * Fix test * display the error on console * Move minio test to amd64 since minio docker don't support arm64 * refactor the codes * add trace * Fix test * remove log on xorm * Fi download bug * Add a storage layer for attachments * Add setting for minio and flags for migrate-storage * fix lint * Add test for minio store type on attachments * Apply suggestions from code review Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> * Fix drone * fix test * Fix test * display the error on console * Move minio test to amd64 since minio docker don't support arm64 * refactor the codes * add trace * Fix test * Add URL function to serve attachments directly from S3/Minio * Add ability to enable/disable redirection in attachment configuration * Fix typo * Add a storage layer for attachments * Add setting for minio and flags for migrate-storage * fix lint * Add test for minio store type on attachments * Apply suggestions from code review Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> * Fix drone * fix test * Fix test * display the error on console * Move minio test to amd64 since minio docker don't support arm64 * don't change unrelated files * Fix lint * Fix build * update go.mod and go.sum * Use github.com/minio/minio-go/v6 * Remove unused function * Upgrade minio to v7 and some other improvements * fix lint * Fix go mod Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Tyler <tystuyfzand@gmail.com>
* Kanban board (#8346)Lanre Adelowo2020-08-165-0/+60
| | | | | | | | | | | | | Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: jaqra <48099350+jaqra@users.noreply.github.com> Co-authored-by: Kerry <flatline-studios@users.noreply.github.com> Co-authored-by: Jaqra <jaqra@hotmail.com> Co-authored-by: Kyle Evans <kevans91@users.noreply.github.com> Co-authored-by: Tsakiridis Ilias <TsakiDev@users.noreply.github.com> Co-authored-by: Ilias Tsakiridis <ilias.tsakiridis@outlook.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Make the default PID file compile-time settable (#12485)zeripath2020-08-151-3/+4
| | | | | | | | | | #12391 offered to change the default PID file from /var/run/gitea.pid however in discussion it was decided that this could break users of older systems. An alternative was offered that we could make the PID file compile/link time settable. This PR does this, and changes the name of the setting from CustomPID to simply PIDFile. It also updates the from-source docs to show how to change the compiler settings to do this. Closes #12391 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Florian Klink <flokli@flokli.de>
* Add Access-Control-Expose-Headers (#12446)zeripath2020-08-132-0/+3
| | | | | | Fix #12424 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io>
* go1.15 (#12475)techknowlogick2020-08-132-1/+3
| | | | | | | | | | | | | * go1.15 * update makefile xgo version * fix vet issue * update docs to version of go in use * add TODO for asyncpreemptoff Co-authored-by: Lauris BH <lauris@nix.lv>
* Do not add prefix on http/https submodule links (#12477)zeripath2020-08-132-3/+4
| | | | | Fix #12345 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Re-attempt to delete temporary upload if the file is locked by another ↵zeripath2020-08-1125-101/+127
| | | | | | | | | | | process (#12447) Replace all calls to os.Remove/os.RemoveAll by retrying util.Remove/util.RemoveAll and remove circular dependencies from util. Fix #12339 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io>
* Make dashboard newsfeed list length a configurable item (#12469)techknowlogick2020-08-111-0/+2
| | | Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Prevent redirect back to /user/events (#12462)zeripath2020-08-081-3/+6
| | | | | | This PR prevents 2 further ways of causing the redirect cookie to be set to redirect back to /user/events Signed-off-by: Andrew Thornton <art27@cantab.net>
* Make default StaticRootPath compile time settable (#12371)65432020-08-081-1/+4
| | | | | | Make it possible to compile the default location of StaticRootPath independent from AppWorkPath Co-authored-by: Andrew Thornton <art27@cantab.net>
* Detect full references to issues and pulls in commit messages (#12399)zeripath2020-08-063-8/+200
| | | | | Fix #10269 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Render the git graph on the server (#12333)zeripath2020-08-065-91/+1236
| | | | | | | | | | | | | Rendering the git graph on the server means that we can properly track flows and switch from the Canvas implementation to a SVG implementation. * This implementation provides a 16 limited color selection * The uniqued color numbers are also provided * And there is also a monochrome version *In addition is a hover highlight that allows users to highlight commits on the same flow. Closes #12209 Signed-off-by: Andrew Thornton art27@cantab.net Co-authored-by: silverwind <me@silverwind.io>
* Mirror System Notice reports are too frequent (#12438)zeripath2020-08-053-8/+18
| | | | | | This PR switches off the success reports from the Update Mirrors cron job as they are too frequent and not necessarily helpful. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add loading spinners and mermaid error handling (#12358)silverwind2020-08-042-5/+27
| | | | | - Add loading spinners on editor and mermaid renderers - Add error handling and inline error box for mermaid - Fix Mermaid rendering by using the .init api
* Fix incorrect error logging in Stats indexer and OAuth2 (#12387)zeripath2020-08-012-3/+9
| | | | | | | | | | | | | | | | | | | | * Fix incorrect logging in oauth2.go Fix #11945 Signed-off-by: Andrew Thornton <art27@cantab.net> * Handle ErrAlreadyInQueue in stats indexer Fix #12380 Signed-off-by: Andrew Thornton <art27@cantab.net> * Fixes type in error message of indexer Add the missing character in the error message. Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lieven Hollevoet <hollie@lika.be>
* [Vendor] upgrade google/go-github to v32.1.0 (#12361)65432020-07-312-5/+5
| | | | | | * upgrate go-github client to v32.1.0 * migrate
* Don't use legacy method to send Matrix Webhook (#12348)S7evinK2020-07-303-8/+59
| | | | | | | | | | | | | | | | | * Don't use legacy send for messages * Add migrations to ensure Matrix webhooks use PUT * Set HTTP method to PUT as default * Fix sql condition.. Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Rename getTxnID -> getMatrixTxnID * Use local variable instead of constant value Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add action feed for new release (#12324)赵智超2020-07-292-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add action feed for new release Signed-off-by: a1012112796 <1012112796@qq.com> * fix lint * Apply suggestions from code review * Add ReleaseID to the action table * Remove error message * Fold the attachments download list * remove attchment download list * simplify code * fix create release from existing tag * simplify ui * translation change * fix test Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Git 2.28 no longer permits diff with ... on unrelated branches (#12364)zeripath2020-07-293-12/+60
| | | | | | | * Git 2.28 no longer permits diff with ... on unrelated branches Signed-off-by: Andrew Thornton <art27@cantab.net> * need to check stderr
* Only use --exclude on name-rev with git >= 2.13 (#12347)zeripath2020-07-281-1/+15
| | | | | Fix #11917 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add name filter to API for GetMilestoneList (#12336)65432020-07-281-2/+8
| | | | | | | | | Adds a name filter to the API for GetMilestoneList Includes a small refactor: merge GetMilestones and GetMilestonesByRepoID Close #12260 Needed for https://gitea.com/gitea/go-sdk/issues/383 and https://gitea.com/gitea/tea/pulls/149
* Use url.Parse to parse hostname (#12335)techknowlogick2020-07-261-5/+2
|
* Fix ipv6 parsing (#12321)Wim2020-07-261-5/+6
| | | | | | | | | | | | * Fix ipv6 parsing * Update modules/setting/setting.go Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix emoji detection in certain cases (#12320)mrsdizzie2020-07-252-1/+22
| | | | | | | | | | | * Fix emoji detection certain cases Previous tests weren't complicated enough so there were some situations where emojis were't detected properly. Find the earliest occurance in addition to checking for the longest combination. Fixes #12312 * ok spell bot Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix double-indirection bug in logging IDs (#12294)zeripath2020-07-231-1/+1
| | | | | | This PR fixes a bug in log.NewColoredIDValue() which led to a double indirection and incorrect IDs being printed out. Signed-off-by: Andrew Thornton <art27@cantab.net>
* prefer NoError/Error over Nil/NotNil (#12271)Stephen Solka2020-07-199-27/+27
|
* Update Octicons to v10 (#12240)silverwind2020-07-172-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update Octicons to v10 Besides a few renames, these icons are no longer present in v10 that we've used, so had to change: file-symlink-directory -> file-submodule internal-repo -> repo repo-force-push -> repo-push repo-template-private -> repo-template Fixes: https://github.com/go-gitea/gitea/issues/11889 Ref: https://github.com/primer/octicons/releases/tag/v10.0.0 * add custom sliders svg for removed octicon-settings * apply suggestion * fix triangles and use play on admin dashboard * add custom mirror svg * add missing build files * unify custom svgs * move to octicon-repo-clone to gitea-mirror * use octicon-x on conflicts * tweak timeline icons * tweak comment buttons * update settings icon to octicons v1 * switch to octicon-mirror and octicon-tools * replace two wiki buttons with octicons * remove whitespace in svg sources * Fix filepath basename on Windows for SVG bindata (#12241) * move octicons to devDependencies * move back to dependencies * move svgo to devDependencies again Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Ensure that git commit tree continues properly over the page (#12142)zeripath2020-07-161-14/+53
| | | | | | | | | | | | | | | * Ensure that git commit tree continues properly over the page Signed-off-by: Andrew Thornton <art27@cantab.net> * Avoid generating strings when skipping Signed-off-by: Andrew Thornton <art27@cantab.net> * skip initial non-commit-lines Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix filepath basename on Windows for SVG bindata (#12241)Cirno the Strongest2020-07-132-5/+3
|
* Direct SVG rendering (#12157)silverwind2020-07-124-1/+88
| | | | | | | | | | | | Introduce 'make svg' which calls a node script that compiles svg files to `public/img/svg`. These files are vendored to not create a dependency on Node for the backend build. On the frontend side, configure webpack using `raw-loader` so SVGs can be imported as string. Also moved our existing SVGs to web_src/svg for consistency. Fixes: https://github.com/go-gitea/gitea/issues/11618
* Ensure syntax highlighting is the same inside diffs (#12205)mrsdizzie2020-07-111-4/+8
| | | | | Make sure to end up with the same syntax highlighting inside various sections of diffs by processing the code first before detecting specific changes between the lines. Also try and make sure that when highlighting individual lines in a diff that it is tokenized the same as it would be when part of an entire file with more context. Fixes: #12190
* Make copy/paste work for source code (#12191)mrsdizzie2020-07-081-2/+15
| | | | | | | | | | | | | | | * Make copy/paste work for source code Fix regression casued by #12047 so copy/paste works properly in all browsers. Fixes #12184 Also while looking at this I saw a small display issue for blame view. I think #12023 was merged into original PR through an update branch before #12047 was merged and made one of the css ruules not apply anymore. * use pseudo-element to prevent copying of comment + symbol even when not visually selected * remove added newline here should not be necessary anymore * make sure empty line is newline so there is something to select and copy
* Remove newline when highlighting random chunks of code (#12180)mrsdizzie2020-07-081-1/+2
| | | | | | | | | | | * Remove newline when highlighting random chunks of code Somewhere when tokenizing a newline gets added to code formatted by chroma. This breaks the case of 'added-code' inside of an 'added-line' in a diff. Just remove any newline when processing chunks of code since we don't need it. Fixes #12172 * don't process empty lines * This is the proper way to fix this by telling chroma not to add the newline in the first place
* fix a spelling error (#12163)Stormxx2020-07-061-1/+1
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Update the wiki repository remote origin while update the mirror ↵yisiliang2020-07-051-3/+3
| | | | | | | | | | | | | | repository's Clone From URL (#12053) * update the wiki repository remote origin #12050 * wikiRemoteURL is under repo_module * export WikiRemoteURL func * remove redundant space and empty line Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Pause, Resume, Release&Reopen, Add and Remove Logging from command line (#11777)zeripath2020-07-0510-5/+322
| | | | | | | | | | | | | | | | | | | | | | * Make LogDescriptions race safe * Add manager commands for pausing, resuming, adding and removing loggers Signed-off-by: Andrew Thornton <art27@cantab.net> * Placate lint * Ensure that file logger is run! * Add support for smtp and conn Signed-off-by: Andrew Thornton <art27@cantab.net> * Add release-and-reopen Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Use hash of repo path, ref and entrypath as cache key (#12151)Lauris BH2020-07-061-2/+8
|
* Multiple small admin dashboard fixes (#12153)zeripath2020-07-052-1/+3
| | | | | | | | | * Remove spurious spacing between Maintenance Operations and its table on dashboard * Prevent (EXTRA string) comments in Task headers * Redirect tasks started from monitor page back to monitor * Fix #12107 - redirects from process cancel should use AppSubUrl * When wrapping queues set the name correctly Signed-off-by: Andrew Thornton <art27@cantab.net>