summaryrefslogtreecommitdiffstats
path: root/modules
Commit message (Collapse)AuthorAgeFilesLines
* Handle push rejection message in Merge & Web Editor (#10373)zeripath2020-02-221-2/+22
| | | | | | | | | | | | | | | | | | * Handle push rejection message in Merge * placate golangci-lint * Fix sanitize, adjust message handling * oops * Oops * Handle push-rejection in webeditor CRUD too * Apply suggestions from code review Co-authored-by: Lauris BH <lauris@nix.lv>
* Render READMEs in docs/ .gitea or .github from root (#10361)zeripath2020-02-212-0/+38
| | | | * Render READMEs in docs/ .gitea or .github from root
* Add detected file language to code search (#10256)Lauris BH2020-02-208-52/+188
| | | | | | | Move langauge detection to separate module to be more reusable Add option to disable vendored file exclusion from file search Allways show all language stats for search
* Fix notification (#10331)Lunny Xiao2020-02-181-18/+18
|
* Inject SVG sprite via ajax (#10320)John Olheiser2020-02-171-1/+1
| | | | | | | | | | * AJAX SVG * Fix PWA * Remove unused PWA assets Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-Authored-by: silverwind <me@silverwind.io>
* Don't manually replace whitespace during render (#10291)mrsdizzie2020-02-172-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Don't manually replace whitespace during render For historical reasons Gitea manually alters the urlPrefix and replaces a whitespace with a +. This Works for URLs, but we're also passing urlPrefix to git calls and adding the + is breaking the tree path. Goldmark will automatically convert a white space to the proper %20, so we should leave the string as is which lets us pass it to git unmodified and then let Goldmark fix it. Also fixed separate bug in URLJoin I noticed while testing where it will silently discard sections of a path that have # in them (possibly others). We should just escape it first. Fixes 10156 * Escape elems as well * Revert "Escape elems as well" This reverts commit 8bf49596fee6fac4d9da256cd1e90a0ec0183671. * restart ci * remove changes to URLJoin * restart ci Co-authored-by: techknowlogick <matti@mdranta.net>
* Notification: queue ui.go notification-service (#10281)zeripath2020-02-151-16/+27
| | | | Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix Workerpool deadlock (#10283)zeripath2020-02-152-3/+6
| | | | | | * Prevent deadlock on boost * Force a boost in testchannelqueue
* Index code and stats only for non-empty repositories (#10251)Lauris BH2020-02-141-2/+2
| | | | | Fix test and switch to unique queue Fix MySQL support when deleting old statistics
* Issue search support elasticsearch (#9428)Lunny Xiao2020-02-134-21/+273
| | | | | | | | | | | | * Issue search support elasticsearch * Fix lint * Add indexer name on app.ini * add a warnning on SearchIssuesByKeyword * improve code
* Add API branch protection endpoint (#9311)David Svantesson2020-02-122-25/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add API branch protection endpoint * lint * Change to use team names instead of ids. * Status codes. * fix * Fix * Add new branch protection options (BlockOnRejectedReviews, DismissStaleApprovals, RequireSignedCommits) * Do xorm query directly * fix xorm GetUserNamesByIDs * Add some tests * Improved GetTeamNamesByID * http status created for CreateBranchProtection * Correct status code in integration test Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Fix queue pop error and stat empty repository error (#10248)Lunny Xiao2020-02-123-2/+8
| | | | | | * Fix queue pop error and stat empty repository error * Fix error
* Add feishu webhook support (#10229)Lunny Xiao2020-02-125-2/+219
| | | | Add feishu webhook support
* Stop hanging issue indexer initialisation from preventing shutdown (#10243)zeripath2020-02-121-17/+15
| | | | | Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* Add Octicon SVG spritemap (#10107)John Olheiser2020-02-112-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add octicon SVG sprite Signed-off-by: jolheiser <john.olheiser@gmail.com> * Static prefix Signed-off-by: jolheiser <john.olheiser@gmail.com> * SVG for all repo icons Signed-off-by: jolheiser <john.olheiser@gmail.com> * make vendor Signed-off-by: jolheiser <john.olheiser@gmail.com> * Swap out octicons Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move octicons to top of less imports Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix JS Signed-off-by: jolheiser <john.olheiser@gmail.com> * Definitely not a search/replace Signed-off-by: jolheiser <john.olheiser@gmail.com> * Missed regex Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move to more generic calls and webpack Signed-off-by: jolheiser <john.olheiser@gmail.com> * make svg -> make webpack Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove svg-sprite Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Missed a test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove svg from makefile Signed-off-by: jolheiser <john.olheiser@gmail.com> * Suggestions Signed-off-by: jolheiser <john.olheiser@gmail.com> * Attempt to fix test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Revert timetracking test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Swap .octicon for .svg in less Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add aria-hidden Signed-off-by: jolheiser <john.olheiser@gmail.com> * Replace mega-octicon Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix webpack globbing on Windows Signed-off-by: jolheiser <john.olheiser@gmail.com> * Revert Co-Authored-By: silverwind <me@silverwind.io> * Fix octions from upstream Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix Vue and missed JS function Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add JS helper and PWA Signed-off-by: jolheiser <john.olheiser@gmail.com> * Preload SVG Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <matti@mdranta.net>
* Language statistics bar for repositories (#8037)Lauris BH2020-02-119-5/+353
| | | | | | | | | | | | | | | | | | * Implementation for calculating language statistics Impement saving code language statistics to database Implement rendering langauge stats Add primary laguage to show in repository list Implement repository stats indexer queue Add indexer test Refactor to use queue module * Do not timeout for queues
* Restore graceful restart on SIGHUP (#10224)zeripath2020-02-111-2/+2
| | | | Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix commit between two commits calculation if there is only last commit (#10225)Lauris BH2020-02-111-1/+1
|
* [API] Fix inconsistent label color format (#10129)65432020-02-092-4/+4
| | | | | | | | | | | | | | | | * update and use labelColorPattern * add TestCases * fix lint * # optional for templates * fix typo * some more * fix lint of **master**
* modules/log: remove noop written variables (#10182)Lars Lehtonen2020-02-071-8/+0
| | | | Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* Prevent double waitgroup decrement (#10170)zeripath2020-02-071-3/+7
| | | | * Prevent double waitgroup decrement
* [API] expose RepoOwner on Issue responce (#10126)65432020-02-041-0/+1
| | | | | | * add RepoOwner on issue api responce * CI.restart()
* Show download count info in release list (#10124)Lauris BH2020-02-033-40/+16
| | | | | | * Show download count info in release list * Use go-humanize
* Move PushUpdateAddDeleteTags to repository module from models (#10106)Lunny Xiao2020-02-032-1/+135
| | | | | | * Move PushUpdateAddDeleteTags to repository module from models * Fix deadlock on sqlite
* Add Unique Queue infrastructure and move TestPullRequests to this (#9856)zeripath2020-02-0216-403/+1389
| | | | | | | | | | | | | | | | | | | | | * Upgrade levelqueue to version 0.2.0 This adds functionality for Unique Queues * Add UniqueQueue interface and functions to create them * Add UniqueQueue implementations * Move TestPullRequests over to use UniqueQueue * Reduce code duplication * Add bytefifos * Ensure invalid types are logged * Fix close race in PersistableChannelQueue Shutdown
* Improve push update options (#10105)Lunny Xiao2020-02-023-143/+187
| | | | | | | | | | | | | | * Improve push update options * fix test * More refactor and fix lint * fix lint * Fix lint Co-authored-by: Lauris BH <lauris@nix.lv>
* Add warning when using relative path to app.ini (#10104)guillep2k2020-02-021-0/+1
| | | | Co-authored-by: Lauris BH <lauris@nix.lv>
* Implement "embedded" command to extract static resources (#9982)guillep2k2020-02-023-0/+77
| | | | | | | | | | | | | | | | | | | | | | | * draft * Implement extract command * Fix nits and force args on extract * Add !bindata stub, support Windows, fmt * fix vendored flag * Remove leading slash for matching * Add docs * Fix typos * Add embedded view command Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix broken FlushAll (#10101)zeripath2020-02-011-4/+4
| | | | | | | | | | * go function contexting is not what you expect * Apply suggestions from code review Co-Authored-By: Lauris BH <lauris@nix.lv> Co-authored-by: Lauris BH <lauris@nix.lv>
* Cache last commit to accelerate the repository directory page visit (#10069)Lunny Xiao2020-02-015-19/+176
| | | | | | | | | | | | | | | * Cache last commit to accelerate the repository directory page visit * Default use default cache configuration * add tests for last commit cache * Simplify last commit cache * Revert Enabled back * Change the last commit cache default ttl to 8760h * Fix test
* Accept punctuation after simple+cross repository issue references (#10091)guillep2k2020-02-012-13/+97
| | | | | | | | | | * Support references ending in , . and ; * Accept :;, in simple refs; fix 2+ consecutive refs * Include cross-repository references * Add ?!, fix spacing problem
* [BugFix] [API] Pull.API.Convert: Only try to get HeadBranch if HeadRepo ↵65432020-01-312-29/+50
| | | | | | | | | | | | | | exist (#10029) * only try to get HeadBranch if HeadRepo exist * impruve * no nil error * add TEST * correct error msg
* API endpoint for repo transfer (#9947)65432020-01-311-0/+9
| | | | | | | | | | * squash * optimize * fail before make any changes * fix-header
* Fix leveldb test race (#10054)Lunny Xiao2020-01-301-0/+18
| | | | | Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Implement basic app.ini and path checks to doctor cmd (#10064)guillep2k2020-01-302-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | * Add doctor check of app.ini paths * Make /custom dir not mandatory * Fix message and improve interface * Update cmd/doctor.go Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com> * Apaise lint * Isn't the linter a sweet? (1) * Isn't the linter a sweet? (2) * Isn't the linter a sweet?? (3) * Restart CI Co-authored-by: John Olheiser <42128690+jolheiser@users.noreply.github.com> Co-authored-by: zeripath <art27@cantab.net>
* [UI] Show pull icon on pull (#10061)65432020-01-291-1/+1
| | | | | * make fmt * show pull icon on pull
* Movde dependents on macaron from modules/setting (#10050)Lunny Xiao2020-01-294-31/+47
| | | | Co-authored-by: Lauris BH <lauris@nix.lv>
* Queue: Make WorkerPools and Queues flushable (#10001)zeripath2020-01-2816-322/+780
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make WorkerPools and Queues flushable Adds Flush methods to Queues and the WorkerPool Further abstracts the WorkerPool Adds a final step to Flush the queues in the defer from PrintCurrentTest Fixes an issue with Settings inheritance in queues Signed-off-by: Andrew Thornton <art27@cantab.net> * Change to for loop * Add IsEmpty and begin just making the queues composed WorkerPools * subsume workerpool into the queues and create a flushable interface * Add manager command * Move flushall to queue.Manager and add to testlogger * As per @guillep2k * as per @guillep2k * Just make queues all implement flushable and clean up the wrapped queue flushes * cope with no timeout Co-authored-by: Lauris BH <lauris@nix.lv>
* More expansions in template repositories (#10021)John Olheiser2020-01-281-56/+82
| | | | | | | | * Super expansion * Explain which features are in 1.11 vs 1.12 * Move imports Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Some refactor on git diff and ignore getting commit information failed on ↵Lunny Xiao2020-01-283-7/+351
| | | | | | | | | | | | | | migrating pull request review comments (#9996) * Some refactor on git diff and ignore getting commit information failed on migrating pull request review comments * fix test * fix lint * Change error log to warn
* Generate Bindata iff TAGS="bindata" and not up-to-date (#10004)zeripath2020-01-278-74/+21
| | | | | | | | | | | | | | | | | | | | | | * Only generate bindata if necessary * Only generate bindata if they are not up-to-date * generate a hash of the fileinfo and use that to keep up-to-date * Newer test is redundant * handle missing bindata and clean * Only update hash after successful write * switch to sha1 hash * Apply suggestions from code review Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Sanitize credentials in mirror form (#9975)Lunny Xiao2020-01-252-0/+28
|
* Fix pull view when head repository or head branch missed and close related ↵Lunny Xiao2020-01-251-5/+17
| | | | | | | | | | | | | | | | | | pull requests when delete head repository or head branch (#9927) * fix pull view when head repository or head branch missed and close related pull requests when delete branch * fix pull view broken when head repository deleted * close pull requests when head repositories deleted * Add tests for broken pull request head repository or branch * fix typo * ignore special error when close pull request Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix file rename/copy not supported by indexer (#9965)guillep2k2020-01-241-2/+27
| | | | Co-authored-by: zeripath <art27@cantab.net>
* API add/generalize pagination (#9452)SpaWn2KiLl2020-01-247-14/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
* Fix repo indexer not updating upon push (#9957)guillep2k2020-01-241-1/+2
| | | | | | | | * Fix check for push on default branch * restart CI Co-authored-by: zeripath <art27@cantab.net>
* Migrate reviews when migrating repository from github (#9463)Lunny Xiao2020-01-238-4/+401
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix typo * Migrate reviews when migrating repository from github * fix lint * Added test and migration when external user login * fix test * fix commented state * Some improvements * fix bug when get pull request and ref original author on code comments * Fix migrated line; Added comment for review * Don't load all pull requests attributes * Fix typo * wrong change copy head * fix tests * fix reactions * Fix test * fix fmt * fix review comment reactions
* Make archive prefixing configurable with a global setting (#9943)zeripath2020-01-222-9/+37
| | | | | | | | * Allow archive prefix setting * Update copyright * Update copyright
* Don't convert ellipsis in markdown (#9905)John Olheiser2020-01-221-2/+3
| | | | | | | | | | | | | | * Don't convert ellipsis Signed-off-by: jolheiser <john.olheiser@gmail.com> * Formatting Co-Authored-By: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com> Co-authored-by: zeripath <art27@cantab.net>
* Fix wrong hint when status checking is running on pull request view (#9886)Lunny Xiao2020-01-222-0/+64
| | | | | | | | | | | | | | | | * Fix wrong hint when status checking is running on pull request view * fix lint * fix test * fix test * fix wrong tmpl * fix import * rename function name