aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Code Formats, Nits & Unused Func/Var deletions (#15286)65432021-04-0933-98/+41
| | | | | | | | | | | | | | | * _ to unused func options * rm useless brakets * rm trifial non used models functions * rm dead code * rm dead global vars * fix routers/api/v1/repo/issue.go * dont overload import module
* Stop packaging node_modules in release tarballs (#15273)silverwind2021-04-098-60/+30
| | | | | | | | | | | | | | | | | - Don't package node_modules in tarballs, they are not cross-platform anymore and npm cache should not be messed with directly. Instead, require an internet connection to rebuild the UI, which is not necessary in the general use case because prebuilt UI files are shipped in the public directory. - Simplify the fomantic build and make the target phony. We don't need anything more for something that is rarely ran. - Use regular tar again to build tarballs and add variable for excludes - Disable annoying npm update notifications Fixes: https://github.com/go-gitea/gitea/pull/14578 Fixes: https://github.com/go-gitea/gitea/pull/15256 Fixes: https://github.com/go-gitea/gitea/pull/15262 Co-authored-by: 6543 <6543@obermui.de>
* Fix Dropzone following #15315 (#15353)zeripath2021-04-091-1/+1
| | | | | | | | | | | | | | | * Fix Dropzone following #15315 #15315 appears to have caused a change in the way Dropzone is imported - and it now produces a module rather than the constructor. This PR rather hackily just adds another Dropzone call to the result. Signed-off-by: Andrew Thornton <art27@cantab.net> * use destructured export Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: 6543 <6543@obermui.de>
* [API] pull notification subject status: add "merged" (#15344)65432021-04-091-0/+5
| | | Current subject status can be "", "open" and "closed". This add "merged" to it.
* Fix button border issue (#15350)silverwind2021-04-091-1/+1
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add LFS Migration and Mirror (#14726)KN4CK3R2021-04-0875-710/+2158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implemented LFS client. * Implemented scanning for pointer files. * Implemented downloading of lfs files. * Moved model-dependent code into services. * Removed models dependency. Added TryReadPointerFromBuffer. * Migrated code from service to module. * Centralised storage creation. * Removed dependency from models. * Moved ContentStore into modules. * Share structs between server and client. * Moved method to services. * Implemented lfs download on clone. * Implemented LFS sync on clone and mirror update. * Added form fields. * Updated templates. * Fixed condition. * Use alternate endpoint. * Added missing methods. * Fixed typo and make linter happy. * Detached pointer parser from gogit dependency. * Fixed TestGetLFSRange test. * Added context to support cancellation. * Use ReadFull to probably read more data. * Removed duplicated code from models. * Moved scan implementation into pointer_scanner_nogogit. * Changed method name. * Added comments. * Added more/specific log/error messages. * Embedded lfs.Pointer into models.LFSMetaObject. * Moved code from models to module. * Moved code from models to module. * Moved code from models to module. * Reduced pointer usage. * Embedded type. * Use promoted fields. * Fixed unexpected eof. * Added unit tests. * Implemented migration of local file paths. * Show an error on invalid LFS endpoints. * Hide settings if not used. * Added LFS info to mirror struct. * Fixed comment. * Check LFS endpoint. * Manage LFS settings from mirror page. * Fixed selector. * Adjusted selector. * Added more tests. * Added local filesystem migration test. * Fixed typo. * Reset settings. * Added special windows path handling. * Added unit test for HTTPClient. * Added unit test for BasicTransferAdapter. * Moved into util package. * Test if LFS endpoint is allowed. * Added support for git:// * Just use a static placeholder as the displayed url may be invalid. * Reverted to original code. * Added "Advanced Settings". * Updated wording. * Added discovery info link. * Implemented suggestion. * Fixed missing format parameter. * Added Pointer.IsValid(). * Always remove model on error. * Added suggestions. * Use channel instead of array. * Update routers/repo/migrate.go * fmt Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
* Show diff on rename with diff changes (#15338)zeripath2021-04-081-12/+8
| | | | | | | | | | | | | More recent versions of git have increased support for detection of renames meaning that a rename with diff changes is now supported. Although ParsePatch supports this - our templates do not and the simplest solution is simply to show the diff. Fix #15335 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Disable cssnano's colormin plugin (#15347)silverwind2021-04-081-0/+1
| | | | | | It produces odd rgba values which also seem to cause issues in monaco's color parser where the scoll shadow went red for some reason. Regression by: https://github.com/go-gitea/gitea/pull/15333
* Prepend AppSubUrl to links for default avatar (#15341)zeripath2021-04-083-4/+4
| | | | | Fix #15334 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add dashboard milestone search and repo milestone search by name (#14866)Roger Luo2021-04-085-58/+165
| | | | | Feature for issue #13845: - Add milestones search by name on dashboard milestones page. - Add milestones search by name on repo issue/milestones page.
* Add frontend testing, require node 12 (#15315)silverwind2021-04-0812-35/+5151
| | | | | | | | | | - Add basic frontend unit testing infrastructure using jest in ESM mode - Rename 'make test' to 'make test-backend' - Introduce 'make test-frontend' and 'make test' that runs both - Bump Node.js requirement to v12. v10 will be EOL in less than a month. - Convert all build-related JS files to ESM. I opted to run frontend tests run as part of the compliance pipeline because they complete fast and are not platform-specific like the golang tests.
* Monaco improvements (#15333)silverwind2021-04-086-24/+86
| | | | | | | - Create theme at runtime which follows the CSS variables of the site - Disable a few opinionated Monaco defaults like minimap and word highlights - Move styles to separate file Co-authored-by: zeripath <art27@cantab.net>
* Fix handling of logout event (#15323)zeripath2021-04-082-2/+2
| | | | | | | It appears that there is a slight bug in the handling of the data of logout event - the javascript should be testing the data field of the data field for the logout instruction. Signed-off-by: Andrew Thornton <art27@cantab.net>
* [Frontport] Changelog (v1.13.6, v1.13.7, v1.14.0-rc2) (#15328)65432021-04-072-1/+38
| | | | | | | | | | | | | * Changelog v1.13.7 (#15319) * Update Changelog (#15322) * update * next * RC2 * Update Docs Version
* Fix CanCreateRepo check (#15311)John Olheiser2021-04-071-0/+3
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-04-071-0/+9
|
* Move modules/forms to services/forms (#15305)zeripath2021-04-0660-335/+335
| | | | | | | | | | | Forms are dependent on models and therefore should be in services. This PR also removes the old auth. aliasing Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Reduce memory usage in testgit (#15306)zeripath2021-04-062-25/+69
| | | | | | | * reduce memory use in rawtest * just use hashsum for diffs Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix bug in Wrap (#15302)zeripath2021-04-061-3/+4
| | | | | | Whilst doing other work I have noticed that there is an issue with Wrap when passing an http.Handler - the next should be the next handler in line not empty. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Close file on invalid range (Addition to #15166) (#15268)KN4CK3R2021-04-063-29/+21
| | | | | | | | | | | | | | | * Close file on invalid range. * Close on seek error Signed-off-by: Andrew Thornton <art27@cantab.net> * Moved 'Seek' into server. * io.ReadSeekCloser is only available in Go 1.16 Co-authored-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Update JS dependencies (#15290)silverwind2021-04-062-1104/+572
| | | | | | | - Update all JS dependencies to latest version, no functional changes. - Remove unused direct dependencies core-js and terser-webpack-plugin. Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: 6543 <6543@obermui.de>
* [skip ci] Updated translations via CrowdinGiteaBot2021-04-062-1/+16
|
* Update to bluemonday-1.0.6 (#15294)zeripath2021-04-0514-69/+154
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Check if stopwatch element empty (#15278)Kyle D2021-04-051-4/+5
|
* [refactor] replace int with httpStatusCodes (#15282)65432021-04-0564-441/+504
| | | | | | | | | | | * replace "200" (int) with "http.StatusOK" (const) * ctx.Error & ctx.HTML * ctx.JSON Part1 * ctx.JSON Part2 * ctx.JSON Part3
* Fix typo in app.example.ini (#15287)Ikko Ashimine2021-04-051-1/+1
| | | | | seperated -> separated Co-authored-by: zeripath <art27@cantab.net>
* Fix xorm log stack level (#15285)Lunny Xiao2021-04-051-8/+10
|
* Drop the event source if we are unauthorized (#15275)zeripath2021-04-044-2/+13
| | | | | | | | | A previous commit that sent unauthorized if the user is unauthorized simply leads to the repeated reopening of the eventsource. # This PR changes the event returned to tell the client to close the eventsource and thus prevents the repeated reopening. Signed-off-by: Andrew Thornton <art27@cantab.net>
* [skip ci] Updated translations via CrowdinGiteaBot2021-04-0426-0/+92
|
* Add size to Save function (#15264)zeripath2021-04-037-10/+17
| | | | | Fix #15253 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Close file on invalid range (#15166)KN4CK3R2021-04-031-0/+8
| | | | | | | | | * Close file on invalid range. * Close on seek error Co-authored-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Branch page and misc css improvements (#15208)silverwind2021-04-037-28/+31
| | | | | | - Improve branches page, increase icon size, use octicons, use css vars - Style placeholder color via css var - Slightly increase contrast of input fields and active/hover states - Add styling for select boxes in arc-green
* update golang libraries (#15258)techknowlogick2021-04-03109-3174/+4196
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-04-031-0/+4
|
* [refactor] mailer service (#15072)65432021-04-0215-143/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Unexport SendUserMail * Instead of "[]*models.User" or "[]string" lists infent "[]*MailRecipient" for mailer * adopt * code format * TODOs for "i18n" * clean * no fallback for lang -> just use english * lint * exec testComposeIssueCommentMessage per lang and use only emails * rm MailRecipient * Dont reload from users from db if you alredy have in ram * nits * minimize diff Signed-off-by: 6543 <6543@obermui.de> * localize subjects * linter ... * Tr extend * start tmpl edit ... * Apply suggestions from code review * use translation.Locale * improve mailIssueCommentBatch Signed-off-by: Andrew Thornton <art27@cantab.net> * add i18n to datas Signed-off-by: Andrew Thornton <art27@cantab.net> * a comment Co-authored-by: Andrew Thornton <art27@cantab.net>
* Fix release expansion issue (#15251)zeripath2021-04-023-2/+4
| | | | | | | | | | | | | | | | | | | | | * Fix release expansion issue Fix #14578 Signed-off-by: Andrew Thornton <art27@cantab.net> * fix cache statement too Signed-off-by: Andrew Thornton <art27@cantab.net> * and update the npmrcs Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @silverwind Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io>
* [skip ci] Updated translations via CrowdinGiteaBot2021-04-021-0/+5
|
* Introduce esbuild on webpack (#14578)Lunny Xiao2021-04-028-930/+157
| | | | | | | | | | | | | | | * Vendor node mods as cache; fix esbuild/fomantic offline build * Fix --exclude; use bsdtar for consistent globbing * Fall back to GNU tar; forward-compatible for APT 2.0 * Avoid having extd. attrs with bsdtar * Dependency and misc. optimizations * Remove extra code after esbuild-loader update Co-authored-by: Mike L <cl.jeremy@qq.com>
* Fix graph pagination (#15225)KN4CK3R2021-04-012-4/+2
| | | | | | | | | | | | | | * Fixed invalid HTML tag. * Fixed pagination. * Update templates/repo/graph/commits.tmpl Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Prevent NPE in CommentMustAsDiff if no hunk header (#15199)zeripath2021-04-011-0/+15
| | | | | | | | | | | | | | | | | | I do not understand how this can happen or why. There is an apparent possibility for a comment.Patch to be missing a hunk header - this should not happen and do not understand how. But it appears to happen on 1.13 at least in some case. This PR will simply add a new section if the cursection is empty thus preventing the NPE. Fix #15198 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Speed up `enry.IsVendor` (#15213)zeripath2021-04-016-4/+116
| | | | | | | | | `enry.IsVendor` is kinda slow as it simply iterates across all regexps. This PR ajdusts the regexps to combine them to make this process a little quicker. Related #15143 Signed-off-by: Andrew Thornton <art27@cantab.net>
* response simple text message for not html request when 404 (#15229)a10121127962021-04-011-0/+17
| | | | | * response simple text message for not html request when response 404 Signed-off-by: a1012112796 <1012112796@qq.com>
* Fix timezone bug when clicking heatmap (#15141)mayswind2021-04-011-1/+1
|
* response 404 for diff/patch of a commit that not exist (#15221)a10121127962021-04-012-1/+7
| | | | | | | | | | | | | | | | * response 404 for diff/patch of a commit that not exist fix #15217 Signed-off-by: a1012112796 <1012112796@qq.com> * Update routers/repo/commit.go Co-authored-by: silverwind <me@silverwind.io> * use ctx.NotFound() Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io>
* [skip ci] Updated translations via CrowdinGiteaBot2021-04-011-0/+4
|
* Diff box fixes (#15214)silverwind2021-03-315-53/+53
| | | | | | | | | | | | | - Fix misaligned "Show Outdated" buttons via flexbox - Add hover effect to "Show Outdated" buttons - Remove overreaching margin from selector .diff-file-box and handle cases individually. Fixes: https://github.com/go-gitea/gitea/issues/15097 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Update docs for bad ini syntax in noreply (#15226)Kyle D2021-03-312-5/+7
|
* Fix regression from #14623 - use debug SVC handler only on interactive ↵zeripath2021-03-311-3/+22
| | | | | | | | | | | | | | | | sessions (#15210) Unfortunately #14623 changed from the deprecated IsInteractiveSession to IsWindowsService without recognising that they are the complement of each other. This means that Windows SVC control is not working correctly. This PR adds some Tracing statements but also fixes the bug. Fix #15159 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix documentation for the fallback mail subject (#15223)David Crocker2021-03-311-1/+1
| | | The documentation for the [fallback mail subject](https://github.com/go-gitea/gitea/blob/d989247bb08d2b8eb144e7a0edeaedfc26d08175/services/mailer/mail_issue.go#L14-L16) was missing `{{}}` around `.Issue.Index`.
* [skip ci] Updated translations via CrowdinGiteaBot2021-03-3126-0/+26
|