aboutsummaryrefslogtreecommitdiffstats
path: root/modules
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* properly set symbolic-ref HEAD when a repo is created with a non-master ↵xenofem2020-07-051-0/+7
| | | | | default branch (#12135) This fixes an issue I noticed with #10803: when you create a repo with a non-master default branch, gitea doesn't change the remote ref HEAD, so it still points at refs/heads/master. As a result, cloning my repos gives me error messages and doesn't check out the desired default branch, so I need to manually check it out after cloning.
* Move EventSource to SharedWorker (#12095)zeripath2020-07-032-2/+5
| | | | | | | | | | | | | Move EventSource to use a SharedWorker. This prevents issues with HTTP/1.1 open browser connections from preventing gitea from opening multiple tabs. Also allow setting EVENT_SOURCE_UPDATE_TIME to disable EventSource updating Fix #11978 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix ui bug in wiki commit page (#12089)赵智超2020-07-021-2/+9
| | | | | | | | | | | | * Fix ui bug in wiki commit page TODO: Maybe we should allow wiki to have its own ``.editorconfig`` file. Signed-off-by: a1012112796 <1012112796@qq.com> * fix a small nit Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Ensure BlameReaders close at end of request (#12102)zeripath2020-07-012-7/+12
| | | | | | | | | | | | | | | | | | | | #11716 reports multiple git blame processes hanging around this was thought to be due to timeouts, however on closer look this appears to be due to the Close() function of the BlameReader hanging with a blocked stdout pipe. This PR fixes this Close function to: * Cancel the context of the cmd * Close the StdoutReader - ensuring that the output pipe is closed Further it makes the context of the `git blame` command a child of the request context - ensuring that even if Close() is not called, on cancellation of the Request the blame is command will also be cancelled. Fixes #11716 Closes #11727 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Server-side syntax highlighting for all code (#12047)mrsdizzie2020-07-015-140/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Server-side syntax hilighting for all code This PR does a few things: * Remove all traces of highlight.js * Use chroma library to provide fast syntax hilighting directly on the server * Provide syntax hilighting for diffs * Re-style both unified and split diffs views * Add custom syntax hilighting styling for both regular and arc-green Fixes #7729 Fixes #10157 Fixes #11825 Fixes #7728 Fixes #3872 Fixes #3682 And perhaps gets closer to #9553 * fix line marker * fix repo search * Fix single line select * properly load settings * npm uninstall highlight.js * review suggestion * code review * forgot to call function * fix test * Apply suggestions from code review suggestions from @silverwind thanks Co-authored-by: silverwind <me@silverwind.io> * code review * copy/paste error * Use const for highlight size limit * Update web_src/less/_repository.less Co-authored-by: Lauris BH <lauris@nix.lv> * update size limit to 1MB and other styling tweaks * fix highlighting for certain diff sections * fix test * add worker back as suggested Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Move fomantic and jQuery to main webpack bundle (#11997)silverwind2020-06-271-1/+0
| | | | | | | | | | | | | | This saves around 3 MB binary size by not including useless fomantic files in the build. Also, this allows us to move jQuery into the main bundle as well which eliminates a few HTTP requests. Also included are webpack config changes: - split less and css loaders to speed up compliation - enable css sourcemaps - switch css minfier plugin to cssnano-webpack-plugin which works better for sourcemaps than the previous plugin Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix comments webhook panic (#12046)Cornel2020-06-248-9/+39
| | | | | | | * Fix webhook comment handling type cast panic * Handle HookIssueReviewed action in webhook Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* [UI] Sortable Tables Header By Click (#7980)65432020-06-241-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | * [UI] Sortable Tables Header By Click * get rid of padding above header * restart CI * fix lint * convert getArrow JS to SortArrow go func * addopt SortArrow funct * suggestions from @silverwind - tablesort.js Co-authored-by: silverwind <me@silverwind.io> * Update web_src/js/features/tablesort.js Co-authored-by: silverwind <me@silverwind.io> * Update web_src/js/features/tablesort.js Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io>
* fix bug about can't skip commits base on base branch (#11555)赵智超2020-06-241-0/+10
| | | | | | | | | | | | | | | | | * fix bug about can't skip commits base on base branch Signed-off-by: a1012112796 <1012112796@qq.com> * Update modules/git/commit.go Co-authored-by: Lauris BH <lauris@nix.lv> * Update models/issue_comment.go Co-authored-by: Lauris BH <lauris@nix.lv> * fix lint Co-authored-by: Lauris BH <lauris@nix.lv>
* API: Move AllowedReactions endpoint into GetGenneralUI endpoint + creat new ↵65432020-06-221-0/+5
| | | | | | | | | | | | | swagger section settings (#11854) * move Setting function into its own package * swagger add&use new section "settings" * move api AllowedReactions into general UI-Settings endpoint * prepare TEST * lint
* Fix typo (#12013)successgo2020-06-221-1/+1
| | | | | | | | | | | * Fix typo of MSSQL * Fix typo: validates * Fix typo * fix comment with space Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add serviceworker.js to KnownPublicEntries (#11992)silverwind2020-06-201-3/+4
| | | | | | | Fixes a wrong 302 redirect to the login page, see https://github.com/go-gitea/gitea/issues/11989. Also made it so the reserved username list is extended with those known entries so we avoid code duplication. Should be backported to 1.12.
* Use enry language type to detect special languages (#11974)Lauris BH2020-06-191-16/+5
|
* For language detection do not try to analyze big files by content (#11971)Lauris BH2020-06-191-3/+7
|
* Use only first line of commit when creating referenced comment (#11960)Cirno the Strongest2020-06-191-1/+2
| | | | | | | | | | * Use only first line of commit when creating referenced comment * Update modules/repofiles/action.go * Display first line only on feeds too Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: zeripath <art27@cantab.net>
* Use google/uuid to instead satori/go.uuid (#11943)Lunny Xiao2020-06-184-9/+9
| | | Co-authored-by: Lauris BH <lauris@nix.lv>
* Global default branch setting (#11918)techknowlogick2020-06-172-1/+4
| | | | | | | | | * Global default branch setting * add to app.ini example per @silverwind * update per @lunny Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Only write to global gitconfig if necessary (#11876)zeripath2020-06-132-25/+65
| | | | | | | | | | | | | * Only write to global gitconfig if necessary Fix #11855 Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Disable all typographic replacements in markdown renderer (#11871)silverwind2020-06-132-8/+1
| | | | | | | | | | | | | | | | | | | * Disable all typographic replacements in markdown renderer Previously we only disabled some of them. This disables all the default replacements that goldmark's typographer extension offers, matching GitHub's renderer. Ref: https://github.com/yuin/goldmark#typographer-extension Fixes: https://github.com/go-gitea/gitea/issues/11001 * remove typographer extension completely * fix test * really fix test Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix 500 error on repos with no tags (#11870)mrsdizzie2020-06-121-1/+1
| | | | | | | | #11846 Introduced feature to show exact tag on commit view. However if a repo has no tags at all git prints out a separate and unhandled error " No names found, cannot describe anything." Adding --always to the command makes it always use the error in the style of "fatal: no tag exactly matches" even if there are no tags at all. Fixes #11869 Fixes #11868
* Handle more pathological branch and tag names (#11843)zeripath2020-06-112-67/+7
| | | | | | | | | | | * Handle more pathological branch and tag names Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix failing test Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix commit search in all branches (#11849)Cirno the Strongest2020-06-111-1/+27
| | | | | | | * Fix commit search in all branches * comments Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Show exact tag for commit on diff view (#11846)Cirno the Strongest2020-06-111-1/+16
| | | | | | | * Show exact tag for commit on diff view * Fix comment Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Prevent panic on empty HOST for mysql (#11850)zeripath2020-06-111-1/+1
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Set the base url when migrating from Gitlab using access token or username ↵Gernot Eger2020-06-111-1/+1
| | | | | | | without password (#11852) When migrating from gitlab, set the baseUrl in NewGitlabDownloader when using an access token or username without password Fix #11851
* Don't consider tag refs as valid for branch name (#11847)Cirno the Strongest2020-06-101-1/+1
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Replace jquery-datetimepicker with native date input (#11684)silverwind2020-06-101-13/+2
| | | | | | | | | | | | This removes the jQuery plugin as well as the associated config options. Native input[type=date] does not require a language attribute as it is localized by default, except for the placeholder attribute for which I currently piggy-back the repo.issues.due_date_form localization option. Implementation should pretty much match GH. Of note is that Safari does not provide a UI for this input type, but I don't think providing one is neccessary and GH did not bother either. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* API expose usefull General Repo settings settings (#11758)65432020-06-101-0/+11
| | | | | | | | | | | * GeneralRepoSettings expose MirrorsDisabled, HTTPGitDisabled, MaxCreationLimit * Apply suggestions from code review Co-authored-by: proton <25139420+proton-ab@users.noreply.github.com> * lint Co-authored-by: proton <25139420+proton-ab@users.noreply.github.com>
* API allow to create closed milestones (#11745)65432020-06-091-0/+2
| | | | | | | | * API allow to create closed milestones * set CloseDate too Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Honor DEFAULT_PAGING_NUM for API (#11805)Cirno the Strongest2020-06-081-1/+1
| | | | | | | | | | * Honor DEFAULT_PAGING_NUM for API * set pagination to 10 for tests * lint Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add option to API to update PullRequest base branch (#11666)65432020-06-071-0/+1
| | | | | * EditPull: add option to change base Close #11552
* Fix visibility of forked public repos from private orgs (#11717)Cirno the Strongest2020-06-061-1/+2
| | | | | | | | | * Fix visibility of forked public repos from private orgs * update forks visibility when org visibility is changed Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix timezone on issue deadline (#11697)Cirno the Strongest2020-06-051-0/+5
| | | | | | | * Fix timezone on issue deadline * FormatDate Co-authored-by: zeripath <art27@cantab.net>
* Dump: add output format tar and output to stdout (#10376)PhilippHomann2020-06-051-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Dump: Use mholt/archive/v3 to support tar including many compressions Signed-off-by: Philipp Homann <homann.philipp@googlemail.com> * Dump: Allow dump output to stdout Signed-off-by: Philipp Homann <homann.philipp@googlemail.com> * Dump: Fixed bug present since #6677 where SessionConfig.Provider is never "file" Signed-off-by: Philipp Homann <homann.philipp@googlemail.com> * Dump: never pack RepoRootPath, LFS.ContentPath and LogRootPath when they are below AppDataPath Signed-off-by: Philipp Homann <homann.philipp@googlemail.com> * Dump: also dump LFS (fixes #10058) Signed-off-by: Philipp Homann <homann.philipp@googlemail.com> * Dump: never dump CustomPath if CustomPath is a subdir of or equal to AppDataPath (fixes #10365) Signed-off-by: Philipp Homann <homann.philipp@googlemail.com> * Use log.Info instead of fmt.Fprintf Signed-off-by: Philipp Homann <homann.philipp@googlemail.com> * import ordering * make fmt Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Matti R <matti@mdranta.net>
* Add hide activity option (#11353)l-jonas2020-06-051-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add hide activity option This closes https://github.com/go-gitea/gitea/issues/7927 * Adjust for linter * Adjust for linter * Add tests * Remove info that admins can view the activity * Adjust new tests for linter * Rename v139.go to v140.go * Rename v140.go to v141.go * properly indent * gofmt Co-authored-by: Jonas Lochmann <git@inkompetenz.org> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix typo (#11773)successgo2020-06-052-14/+14
| | | | | * Fix typo of MSSQL * Fix typo: validates
* Add internal-repo octicon for public repos of private org (#11529)Cirno the Strongest2020-06-051-0/+1
| | | | | | | | | | | | | | | | | | | * Show multiple octicons on repo list * fix mixed spaces/tabs * Internal repo octicon * show internal icon in dashboard repolist * swagger * fix icon for normal repo on repo page * don't expose owner visibility directly; provide internal in repo api * fix icons for forks and mirrors Co-authored-by: Lauris BH <lauris@nix.lv>
* Provide diff and patch API endpoints (#11751)zeripath2020-06-051-0/+4
| | | | | | | | | | | | | | | | | | | | | * Provide diff and patch API endpoints The diff and patch endpoints on the main routes are not accessible by token therefore we provide new API based endpoints for these Fix #10923 Signed-off-by: Andrew Thornton <art27@cantab.net> * placate swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * Make the response an actual string Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>