summaryrefslogtreecommitdiffstats
path: root/modules
Commit message (Collapse)AuthorAgeFilesLines
* Use gitea forked macaron (#7933)Tamal Saha2019-08-2355-94/+108
| | | Signed-off-by: Tamal Saha <tamal@appscode.com>
* Add file status on API (#7671)Lunny Xiao2019-08-212-11/+15
| | | | | | | | | | * add file status on API * fix tests * fix tests * fix tests
* fix bug when migrating a private repository (#7917)Lunny Xiao2019-08-201-1/+12
|
* Fix upload file type check (#7890)Lunny Xiao2019-08-172-10/+54
| | | | | | | | * fix upload file type check * make the function simple and added tests * Update comment as per @silverwind
* Extract the username and password from the mirror url (#7651)zeripath2019-08-161-7/+9
| | | | | | | | | | | | * Explode out mirror username and password * Update models/repo_mirror.go * Just roundtrip the password * remove unused declaration * Update templates/repo/settings/options.tmpl
* Detect delimiter in CSV rendering (#7869)Norwin2019-08-162-6/+66
| | | | | | | | | | | | | | | | | | | | | * detect csv delimiter in csv rendering fixes #7868 * make linter happy * fix failing testcase & use ints where possible * expose markup type to template previously all markup had the .markdown class, which is incorrect, as it applies markdown CSS & JS logic to CSV rendering * fix build (missing `make css`) * ignore quoted csv content for delimiter scoring also fix html generation
* Remove unique filter from repo indexer analyzer. (#7878)guillep2k2019-08-151-3/+2
| | | | | | | | | | * Remove unique filter from repo indexer analyzer. * Bump repoIndexerLatestVersion to 4 * Corrrect fmt * make vendor to remove unique dependency
* Display ui time with customize time location (#7792)Lunny Xiao2019-08-1511-358/+449
| | | | | | | | | | | | | | | | | | * display ui time with customize time location * fix lint * rename UILocation to DefaultUILocation * move time related functions to modules/timeutil * fix tests * fix tests * fix build * fix swagger
* Convert files to utf-8 for indexing (#7814)guillep2k2019-08-157-152/+354
| | | | | | | | | | | | | | * Convert files to utf-8 for indexing * Move utf8 functions to modules/base * Bump repoIndexerLatestVersion to 3 * Add tests for base/encoding.go * Changes to pass gosimple * Move UTF8 funcs into new modules/charset package
* move CreateReview to moduels/pull (#7841)Lunny Xiao2019-08-141-0/+57
|
* Attempt to fix hook problem (#7854)zeripath2019-08-141-1/+3
|
* Check commit message hashes before making links (#7713)Gary Kim2019-08-143-14/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Check commit message hashes before making links Previously, when formatting commit messages, anything that looked like SHA1 hashes was turned into a link using regex. This meant that certain phrases or numbers such as `777777` or `deadbeef` could be recognized as a commit even if the repository has no commit with those hashes. This change will make it so that anything that looks like a SHA1 hash using regex will then also be checked to ensure that there is a commit in the repository with that hash before making a link. Signed-off-by: Gary Kim <gary@garykim.dev> * Use gogit to check if commit exists This commit modifies the commit hash check in the render for commit messages to use gogit for better performance. Signed-off-by: Gary Kim <gary@garykim.dev> * Make code cleaner Signed-off-by: Gary Kim <gary@garykim.dev> * Use rev-parse to check if commit exists Signed-off-by: Gary Kim <gary@garykim.dev> * Add and modify tests for checking hashes in html link rendering Signed-off-by: Gary Kim <gary@garykim.dev> * Return error in sha1CurrentPatternProcessor Co-Authored-By: mrsdizzie <info@mrsdizzie.com> * Import Gitea log module Signed-off-by: Gary Kim <gary@garykim.dev> * Revert "Return error in sha1CurrentPatternProcessor" This reverts commit 28f561cac46ef7e51aa26aefcbe9aca4671366a6. Signed-off-by: Gary Kim <gary@garykim.dev> * Add debug logging to sha1CurrentPatternProcessor This will log errors by the git command run in sha1CurrentPatternProcessor if the error is one that was unexpected. Signed-off-by: Gary Kim <gary@garykim.dev>
* Import topics during migration (#7851)Antoine GIRARD2019-08-147-0/+33
| | | | | | | | * add GetTopics interface * CreateTopics * remove un-needed comment
* Do not fetch all refs (#7797)Mura Li2019-08-131-1/+1
| | | Which would unnecessarily slow down the pull compare operation.
* Fix lax comparison in validation tests (#7815)WGH2019-08-121-2/+6
| | | | | | | | | | | | | | | | | If you add t.Logf("%+v %+v", actual, testCase.expectedErrors) to the test code, you'll notice that only Errors' Messages are being compared: --- PASS: Test_ValidURLValidation/Invalid_schema (0.00s) binding_test.go:43: [Url] [Url] FieldNames and Classification are ignored in comparison. Moreover, an Errors slice with a single Error with empty message is formatted as '[]' (the same as empty slice), which is also error-prone. I discovered this when working on #7791 when one test which was not supposed to pass did pass. https://play.golang.org/p/qC4wVLrm4NG This commit changes the test to do the comparison properly.
* Fix duplicate call of webhook (#7821)Antoine GIRARD2019-08-114-112/+0
|
* Remove camel case tokenization from repo indexer (#7733)guillep2k2019-08-061-3/+2
| | | | | | | | | | | | | | * Make repository indexer tokenize by camel case selectable * Revert "Make repository indexer tokenize by camel case selectable" This reverts commit a8d4e40af56ffeab9c040a13e01b9e0d5487bd3b. * Remove app.ini setting, permanently remove camel case tokenizer * Increase repoIndexerLatestVersion to force indexes to be rebuilt * Changes introduced by the commmand make vendor
* Be more strict with git arguments (#7715)zeripath2019-08-0512-20/+41
| | | | | | * Be more strict with git arguments * fix-up commit test * use bindings for branch name
* Add a lot of extension to language mappings for syntax highlights (#7741)silverwind2019-08-051-35/+79
| | | | | Data partially based on [CodeMirror's meta.js](https://github.com/codemirror/CodeMirror/blob/master/mode/meta.js). Fixes: https://github.com/go-gitea/gitea/issues/6057
* Fix specific highlighting (CMakeLists.txt ...) (#7686)FlorianBen2019-08-041-5/+7
| | | | | | | | * Fix specific highlighting. * Highlighting CMakeLists.txt: remove case sensitive checks. use lowercase checks instead.
* Include "executable" files in the index, as they are not necessarily binary ↵guillep2k2019-08-021-0/+5
| | | | (#7718)
* remove unnecessary fmt on generate bindata (#7706)Lunny Xiao2019-08-013-3/+0
|
* Correct wrong datetime format for git (#7689)zeripath2019-07-312-2/+2
|
* Move commit repo action from models to repofiles package (#7645)Lunny Xiao2019-07-303-1/+338
| | | | | | * move commit repo action from models to repofiles package * fix unit tests
* fix bug on migrating milestone from github (#7665)Lunny Xiao2019-07-291-1/+1
|
* Fix bug create/edit wiki pages when code master branch protected (#7580)Lunny Xiao2019-07-251-1/+7
| | | | | | * fix bug create/edit wiki pages when code master branch protected * improve FullPushingEnvironment function
* Fix panic on push at #7611 (#7615)zeripath2019-07-251-1/+1
| | | | | | | | * Fix panic in #7611 Use pr.IssueID instead of pr.Issue.ID as Issue may not be loaded and is unnecessary * Only fetch the head branch from the remote
* Move models.PushUpdate to repofiles.PushUpdate (#7485)Lunny Xiao2019-07-241-2/+87
| | | | | | * move models.PushUpdate to repofiles.PushUpdate * remove duplicated code to load repo
* Added missing error checks in tests (#7554)Christian Muehlhaeuser2019-07-232-1/+5
| | | Whenever we assign a value to err, check for it being nil.
* Removed unnecessary conversions (#7557)Christian Muehlhaeuser2019-07-2320-37/+31
| | | No need to convert to the same type.
* Fix empty commits now showing in repo overview (#7521)silverwind2019-07-227-13/+24
| | | | | | | | * Fix empty commits now showing in repo overview * add test * make fmt
* Un-lambda base.FileSize (#7556)Christian Muehlhaeuser2019-07-221-4/+2
| | | No need to wrap this.
* Fix markdown invoke sequence (#7513)Lunny Xiao2019-07-181-1/+1
|
* remove duplicated webhook trigger (#7511)Lunny Xiao2019-07-181-1/+0
|
* Remove settting dependency on modules/session (#7237)Lunny Xiao2019-07-173-10/+3
| | | | | | | | | | * remove settting dependency on modules/session * fix fmt * fix tests * fix lint
* Move status table to cron package (#7370)Lunny Xiao2019-07-151-14/+42
|
* only create opened pull request when migrating from github (#7463)Lunny Xiao2019-07-141-1/+1
|
* Support setting cookie domain (#6288)Tamal Saha2019-07-122-1/+5
| | | Signed-off-by: Tamal Saha <tamal@appscode.com>
* wiki history improvements (#7391)Cherrg2019-07-111-0/+10
| | | | | | | | | | | | | | | | | * add history comments to detect page delete Signed-off-by: Michael Gnehr <michael@gnehr.de> * fix too much history entries - caused by --follow flag - if files with same contents exists Signed-off-by: Michael Gnehr <michael@gnehr.de> * style imprevements wiki - history - wrap long author names Signed-off-by: Michael Gnehr <michael@gnehr.de>
* Fix migration tests since #7 fixed (#7375)Lunny Xiao2019-07-081-2/+4
| | | | | | * fix migration tests since #7 fixed * fix test time
* Display original author and URL information when showing migrated ↵mrsdizzie2019-07-0814-87/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | issues/comments (#7352) * Store original author info for migrated issues and comments Keep original author name for displaying in Gitea interface and also store original author user ID for potential future use in linking accounts from old location. * Add original_url for repo Store the original URL for a migrated repo Clean up migrations/tests * fix migration * fix golangci-lint * make 'make revive' happy also * Modify templates to use OriginalAuthor if set Use the original author name in templates if it is set rather than the user who migrated/currently owns the issues * formatting fixes * make generate-swagger * Use default avatar for imported comments * Remove no longer used IgnoreIssueAuthor option * Add OriginalAuthorID to swagger also
* Support git.PATH entry in app.ini (#6772)Mura Li2019-07-072-4/+15
|
* Add additional password hash algorithms (closes #5859) (#6023)EpicCoder2019-07-071-0/+2
|
* Refactor filetype is not allowed errors (#7309)Antoine GIRARD2019-07-061-0/+49
|
* switch to use gliderlabs/ssh for builtin server (#7250)techknowlogick2019-07-061-156/+135
| | | | | | resolves git conflicts from #3896 (credit to @belak, in case github doesn't keep original author during squash) Co-Authored-By: Matti Ranta <techknowlogick@gitea.io>
* Fix typo in PR migration check (#7368)mrsdizzie2019-07-061-1/+1
|
* Make captcha and password optional for external accounts (#6606)AJ ONeal2019-07-062-1/+6
|
* Detect migrating batch size (#7353)Lunny Xiao2019-07-063-17/+67
| | | | | | | | * Make migrating batch size as configurable * detect different table batch insert size and remove config item * remove unrelated changes
* Use commit graph files for listing pages (#7314)Filip Navara2019-07-023-12/+73
| | | | | | | | | | | | | | | | | | | | | | | | * Experimental support for git commit graph files and bloom filter index Signed-off-by: Filip Navara <filip.navara@gmail.com> * Force vendor of commitgraph Signed-off-by: Filip Navara <filip.navara@gmail.com> * Remove bloom filter experiment and debug prints * Remove old code for building commit graphs * Remove unused function * Remove mmap usage * gofmt * sort vendor/modules.txt * Add copyright header and log commit-graph error
* Fix bug conflict between SyncReleasesWithTags and InsertReleases (#7337)Lunny Xiao2019-07-013-10/+16
| | | | | | | | * fix bug conflict between SyncReleasesWithTags and InsertReleases * fix tests * fix fmt