summaryrefslogtreecommitdiffstats
path: root/routers
Commit message (Collapse)AuthorAgeFilesLines
* Language statistics bar for repositories (#8037)Lauris BH2020-02-114-2/+19
| | | | | | | | | | | | | | | | | | * 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
* [API] let admin check org membership on other users (#10201)65432020-02-091-1/+1
| | | | | | | | * fix * fix lint on master Co-authored-by: zeripath <art27@cantab.net>
* Fix followers and following tabs in profile (#10202)Lauris BH2020-02-092-38/+25
|
* [API] Fix inconsistent label color format (#10129)65432020-02-092-3/+25
| | | | | | | | | | | | | | | | * update and use labelColorPattern * add TestCases * fix lint * # optional for templates * fix typo * some more * fix lint of **master**
* Fix push-create SSH bugs (#10145)John Olheiser2020-02-051-1/+11
| | | | | | | | | | | | | | * Attempt to fix push-create SSH bugs Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix binding Signed-off-by: jolheiser <john.olheiser@gmail.com> * Invalid ctx Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Prevent DeleteUser API abuse (#10125)65432020-02-032-1/+7
| | | | | | * fix & co * word suggestions from @jolheiser
* Move PushUpdateAddDeleteTags to repository module from models (#10106)Lunny Xiao2020-02-031-1/+1
| | | | | | * Move PushUpdateAddDeleteTags to repository module from models * Fix deadlock on sqlite
* working part of #9998 (#10114)65432020-02-031-2/+6
| | | | Co-authored-by: zeripath <art27@cantab.net>
* Add Unique Queue infrastructure and move TestPullRequests to this (#9856)zeripath2020-02-021-1/+3
| | | | | | | | | | | | | | | | | | | | | * 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-021-9/+2
| | | | | | | | | | | | | | * Improve push update options * fix test * More refactor and fix lint * fix lint * Fix lint Co-authored-by: Lauris BH <lauris@nix.lv>
* Cache last commit to accelerate the repository directory page visit (#10069)Lunny Xiao2020-02-011-1/+7
| | | | | | | | | | | | | | | * 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
* Fix branch page pull request title and link error (#10092)Lunny Xiao2020-02-011-1/+1
| | | | | | * Fix branch page pull request title and link error * Fix ui
* API endpoint for repo transfer (#9947)65432020-01-314-7/+110
| | | | | | | | | | * squash * optimize * fail before make any changes * fix-header
* Movde dependents on macaron from modules/setting (#10050)Lunny Xiao2020-01-292-4/+27
| | | | Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix milestone API state parameter unhandled (#10049)Lunny Xiao2020-01-292-2/+7
| | | | | | * Fix milestone API state parameter unhandled * Fix test
* Refactor api repo dir (#10048)65432020-01-293-234/+264
| | | | | | | | * mv migrate * mv mirror Co-authored-by: zeripath <art27@cantab.net>
* Queue: Make WorkerPools and Queues flushable (#10001)zeripath2020-01-286-4/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Minor typo fix (#10043)Andy Harrison2020-01-281-1/+1
|
* Fix wiki raw view on sub path (#10002)Lunny Xiao2020-01-282-18/+11
| | | | | | | | * Fix wiki raw view on sub path * Add test for subpath wiki raw file * Fix bug
* Some refactor on git diff and ignore getting commit information failed on ↵Lunny Xiao2020-01-281-2/+2
| | | | | | | | | | | | | | 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
* On merge of already closed PR redirect back to the pulls page (#10010)zeripath2020-01-271-4/+18
| | | | | | | | | * On merge of already closed PR redirect back to the pulls page * More redirects * As per @6543 Co-Authored-By: 6543 <6543@obermui.de>
* fix commit view JS features, reimplement folding (#9968)silverwind2020-01-261-0/+2
| | | | | | | | | | | | | | | * fix commit view JS features, reimplement folding File content folding was not working so I reimplemented it in a saner way. Then I noticed the issue was actually because of missing JS libraries (seen on the console of every commit with error 'SimpleMDE is not defined'). Fixed the libraries. I think the reimplementation is worth to keep. * add .closest polyfill Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix wrong paging on org members (#9990)Lunny Xiao2020-01-261-1/+1
|
* Fix pull view when head repository or head branch missed and close related ↵Lunny Xiao2020-01-251-13/+16
| | | | | | | | | | | | | | | | | | 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>
* API add/generalize pagination (#9452)SpaWn2KiLl2020-01-2457-216/+720
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Make archive prefixing configurable with a global setting (#9943)zeripath2020-01-221-1/+5
| | | | | | | | * Allow archive prefix setting * Update copyright * Update copyright
* Fix wrong hint when status checking is running on pull request view (#9886)Lunny Xiao2020-01-222-10/+12
| | | | | | | | | | | | | | | | * 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
* add remote ip to the invalid credentials error message (#9918)bobemoe2020-01-211-3/+3
|
* Refactor repository check and sync functions (#9854)Lunny Xiao2020-01-201-5/+7
| | | Move more general repository functions out of models/repo.go
* Add support for database schema in PostgreSQL (#8819)guillep2k2020-01-201-0/+3
| | | | | | | | | | | | | | | | | | | * Add support for database schema * Require setting search_path for the db user * Add schema setting to admin/config.tmpl * Use a schema different from default for psql tests * Update postgres scripts to use custom schema * Update to xorm/core 0.7.3 and xorm/xorm c37aff9b3a * Fix migration test Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix wrong permissions check when issues/prs shared operations (#9885)Lunny Xiao2020-01-207-24/+33
| | | | | | | | | | | * Fix wrong permissions check when issues/prs shared operations * move redirect to the last of the function * fix swagger Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Add top author stats to activity page (#9615)Lauris BH2020-01-201-0/+5
|
* Add option to prevent LDAP from deactivating everything on empty search (#9879)zeripath2020-01-201-0/+1
| | | | | | | | | | | * Add option to prevent LDAP from deactivating everything on empty search * Update options/locale/locale_en-US.ini Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Ensure that 2fa is checked on reset-password (#9857)zeripath2020-01-191-8/+75
| | | | | | | | | | | | * Ensure that 2fa is checked on reset-password * Apply suggestions from code review Co-Authored-By: Lauris BH <lauris@nix.lv> * Properly manage scratch_code regeneration Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix issues/pulls dependencies problems (#9842)Lunny Xiao2020-01-194-22/+45
| | | | | | | | * Fix issues/pulls dependencies problems * fix swagger and api param name * fix js
* [Docs] add usefull info to REQUIRE_SIGNIN_VIEW (#9848)65432020-01-171-1/+1
|
* Improve notification pager (#9821)Lunny Xiao2020-01-171-8/+14
| | | | Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* fix (#9836)65432020-01-171-1/+7
|
* Fix download file wrong content-type (#9825)Lunny Xiao2020-01-171-1/+7
| | | | | | | | * Fix download file wrong content-type * change the error text to be more precise * fix test
* Fix wrong identify poster on a migrated pull request when submi… (#9827)Lunny Xiao2020-01-171-1/+1
|
* Add setting to set default and global disabled repository units. (#8788)David Svantesson2020-01-174-131/+157
| | | | | | | | | | | | | | | | | | * Add possibility to global disable repo units. * Add Default Repo Unit app.ini setting. * Hide units * Hide disabled repo units * Minor fixes * Indicate disabled units in team settings. Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Add "Update Branch" button to Pull Requests (#9784)65432020-01-172-1/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add Divergence * add Update Button * first working version * re-use code * split raw merge commands and db-change functions (notify, cache, ...) * use rawMerge (remove redundant code) * own function to get Diverging of PRs * use FlashError * correct Error Msg * hook is triggerd ... so remove comment * add "branch2" to "user2/repo1" because it unit-test "TestPullView_ReviewerMissed" use it but dont exist jet :/ * move GetPerm to IsUserAllowedToUpdate * add Flash Success MSG * imprufe code - remove useless js chage * fix-lint * TEST: add PullRequest ID:5 Repo: user2/repo1 Base: branch1 Head: pr-to-update * correct comments * make PR5 outdated * fix Tests * WIP: add pull update test * update revs * update locales * working TEST * update UI * misspell * change style * add 1s delay so rev exist * move row up (before merge row) * fix lint nit * UI remove divider * Update style * nits * do it right * introduce IsSameRepo * remove useless check Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix admin handling at merge of PR (#9749)David Svantesson2020-01-161-12/+14
| | | | | | | | | | | | | | | | * Admin shall be able to bypass merge checks. * Repository admin should not bypass if merge whitelist is set. * Add code comment about checks that PR are ready * notAllOverrideableChecksOk->notAllOverridableChecksOk * Fix merge, require signed currently not overridable. * fix Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* Fix compare (#9808)Lunny Xiao2020-01-161-24/+20
| | | | Co-authored-by: techknowlogick <matti@mdranta.net>
* Remove unnecessary permissions load (#9796)Lunny Xiao2020-01-163-20/+4
| | | | | Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <matti@mdranta.net>
* Fix push-to-create (#9772)John Olheiser2020-01-161-1/+58
| | | | | | | | | | | | | | | | | | | | | | * Fix push-to-create Signed-off-by: jolheiser <john.olheiser@gmail.com> * Check URL path and service Signed-off-by: jolheiser <john.olheiser@gmail.com> * Send dummy payload on receive-pack GET Signed-off-by: jolheiser <john.olheiser@gmail.com> * The space was actually a NUL byte Signed-off-by: jolheiser <john.olheiser@gmail.com> * Use real bare repo instead of manufactured payload Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix missing msteam webhook on organization (#9781)Lunny Xiao2020-01-151-1/+3
|
* Fix #9662 (#9767)David Svantesson2020-01-151-1/+1
| | | | Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Migrate reactions when migrating repository from github (#9599)Lunny Xiao2020-01-152-4/+4
| | | | | | | | | | | | | | | | | | | | * Migrate reactions when migrating repository from github * fix missed sleep * fix tests * update reactions when external user binding * Fix test * fix tests * change the copy head * fix test * fix migrator add/delete reaction
* Add require signed commit for protected branch (#9708)zeripath2020-01-155-18/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add require signed commit for protected branch * Fix fmt * Make editor show if they will be signed * bugfix * Add basic merge check and better information for CRUD * linting comment * Add descriptors to merge signing * Slight refactor * Slight improvement to appearances * Handle Merge API * manage CRUD API * Move error to error.go * Remove fix to delete.go * prep for merge * need to tolerate \r\n in message * check protected branch before trying to load it * Apply suggestions from code review Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * fix commit-reader Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>