summaryrefslogtreecommitdiffstats
path: root/modules/migrations
Commit message (Collapse)AuthorAgeFilesLines
* tests: configure github remaining limit + read token (#9800)Antoine GIRARD2020-01-162-4/+20
| | | | | | | | | | | | | | | | | | * ci: configure remaining github limmit * prepend with github since package is common to all migrations * add RefreshRate * Update github.go * add missing space * go fmt * Read env variable GITHUB_READ_TOKEN for token * Update .drone.yml
* Migrate reactions when migrating repository from github (#9599)Lunny Xiao2020-01-157-74/+223
| | | | | | | | | | | | | | | | | | | | * 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
* Fix missing updated time on migrated issues and comments (#9744)Lunny Xiao2020-01-146-0/+15
| | | | | | | | * Fix missing updated time on migrated issues and comments * Fix testing and missing updated on migrating pullrequest Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* Move create/fork repository from models to modules/repository (#9489)Lunny Xiao2020-01-121-1/+2
| | | | | | | | | | | | | | | | | | | | * Move create/fork repository from models to modules/repository * fix wrong reference * fix test * fix test * fix lint * Fix DBContext * remove duplicated TestMain * fix lint * fix conflicts
* Fix wrong original git service type on a migrated repository (#9693)Lunny Xiao2020-01-101-6/+7
|
* Use OriginalURL insead of CloneAddr in migration logging (#9418)mrsdizzie2019-12-181-2/+2
| | | | | CloneAddr will contain username and password credentials and they will get stored in system notices about failed migrations (and logs if trace is set). Replace with OriginalURL that doesn't have those.
* Sleep longer if request speed is over github limitation (#9335)Lunny Xiao2019-12-166-14/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Sleep longer if request speed is over github limitation * improve code * remove unused code * fix lint * Use github's rate limit remain value to determine how long to sleep * Save reset time when finished github api request * fix bug * fix lint * Add context.Context for sleep * fix test * improve code * fix bug and lint * fix import order
* Graceful: Xorm, RepoIndexer, Cron and Others (#9282)zeripath2019-12-151-3/+23
| | | | | | | | | | | | * Change graceful to use a singleton obtained through GetManager instead of a global. * Graceful: Make TestPullRequests shutdownable * Graceful: Make the cron tasks graceful * Graceful: AddTestPullRequest run in graceful ctx * Graceful: SyncMirrors shutdown * Graceful: SetDefaultContext for Xorm to be HammerContext * Avoid starting graceful for migrate commands and checkout * Graceful: DeliverHooks now can be shutdown * Fix multiple syncing errors in modules/sync/UniqueQueue & Make UniqueQueue closable * Begin the process of making the repo indexer shutdown gracefully
* Move some repository methods from models to modules/repository (#9353)Lunny Xiao2019-12-141-2/+3
| | | | | | * Move some repository methods from models to modules/repository * fix test
* Add SyncTags to uploader interface (#9326)John Olheiser2019-12-123-17/+16
| | | | | | | | | | * Add sync tags to interface Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix revive Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Only sync tags after all batches (#9319)John Olheiser2019-12-113-7/+15
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add retry for migration http/https requests (#9019)Lunny Xiao2019-11-162-1/+156
| | | | | | | | | | * Add retry for migration http/https requests * give the more suitable name for retry configuraion items * fix docs and lint * Only use retryDownloader when setting > 1
* Add Close() method to gogitRepository (#8901)zeripath2019-11-133-0/+9
| | | | | | | | | In investigating #7947 it has become clear that the storage component of go-git repositories needs closing. This PR adds this Close function and adds the Close functions as necessary. In TransferOwnership the ctx.Repo.GitRepo is closed if it is open to help prevent the risk of multiple open files. Fixes #7947
* Update Github Migration Tests (#8938)mrsdizzie2019-11-121-278/+143
| | | | | | | Update all Github migration tests to use a new repo created just for these tests that won't accidentially be modified by regular users interacting with issues. Fixes #8895
* Update Github migration test (#8893)mrsdizzie2019-11-091-6/+0
| | | | | | | | | | | | * Update Github migration test Earlier today #716 was reopened which updated the modification time for an old milestone (1.6.0) that we use in testing with the assumption that it is old and won't change. This breaks all builds now, so remove this test since we have others that test the same code and this milestone will likely be updated again as that issue changes etc... * ci
* Fix to close opened io resources as soon as not needed (#8839)Lauris BH2019-11-051-33/+39
| | | | | | * Fix to close opened io resources as soon as not needed * Remove unneeded err checks
* Fix bug on pull requests when transfer head repository (#8564)Lunny Xiao2019-10-181-8/+7
| | | | | | | | * fix bug on pull requests when transfer head repository * add migration and fix lint * fix tests and add a cache check on LoadBaseRepo
* Allow externalID to be UUID (#8551)Wenxuan Zhao2019-10-171-7/+1
| | | Signed-off-by: Wenxuan Zhao <viz@linux.com>
* Update migrated repositories' issues/comments/prs poster id if user has a ↵Lunny Xiao2019-10-145-69/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | github external user saved (#7751) * update migrated issues/comments when login as github * add get userid when migrating or login with github oauth2 * fix lint * add migrations for repository service type * fix build * remove unnecessary dependencies on migrations * add cron task to update migrations poster ids and fix posterid when migrating * fix lint * fix lint * improve code * fix lint * improve code * replace releases publish id to actual author id * fix import * fix bug * fix lint * fix rawdata definition * fix some bugs * fix error message
* Move migrating repository from frontend to backend (#6200)Lunny Xiao2019-10-135-35/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * move migrating to backend * add loading image when migrating and fix tests * fix format * fix lint * add redis task queue support and improve docs * add redis vendor * fix vet * add database migrations and fix app.ini sample * add comments for task section on app.ini.sample * Update models/migrations/v84.go Co-Authored-By: lunny <xiaolunwen@gmail.com> * Update models/repo.go Co-Authored-By: lunny <xiaolunwen@gmail.com> * move migrating to backend * add loading image when migrating and fix tests * fix fmt * add redis task queue support and improve docs * fix fixtures * fix fixtures * fix duplicate function on index.js * fix tests * rename repository statuses * check if repository is being create when SSH request * fix lint * fix template * some improvements * fix template * unified migrate options * fix lint * fix loading page * refactor * When gitea restart, don't restart the running tasks because we may have servel gitea instances, that may break the migration * fix js * Update models/repo.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Update docs/content/doc/advanced/config-cheat-sheet.en-us.md Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * fix tests * rename ErrTaskIsNotExist to ErrTaskDoesNotExist * delete release after add one on tests to make it run happy * fix tests * fix tests * improve codes * fix lint * fix lint * fix migrations
* Add extra user information when migrating release (#8331)Lunny Xiao2019-10-054-12/+27
| | | | | | | | * add extra user information when migrating release * add migrations * fix tests
* fix bug when migrating a private repository (#7917)Lunny Xiao2019-08-201-1/+12
|
* Display ui time with customize time location (#7792)Lunny Xiao2019-08-151-13/+13
| | | | | | | | | | | | | | | | | | * 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
* Import topics during migration (#7851)Antoine GIRARD2019-08-147-0/+33
| | | | | | | | * add GetTopics interface * CreateTopics * remove un-needed comment
* fix bug on migrating milestone from github (#7665)Lunny Xiao2019-07-291-1/+1
|
* only create opened pull request when migrating from github (#7463)Lunny Xiao2019-07-141-1/+1
|
* 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-0810-71/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix typo in PR migration check (#7368)mrsdizzie2019-07-061-1/+1
|
* 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
* 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
* Use batch insert on migrating repository to make the process faster (#7050)Lunny Xiao2019-06-296-187/+259
| | | | | | | | | | * Use batch insert on migrating repository to make the process faster * fix lint * fix tests * fix comments
* Fix migration panic when Head.User is not exist (#7226)Lunny Xiao2019-06-181-7/+26
| | | | | | * fix migration panic when Head.User is not exist * fix test
* improve github downloader on migrations (#7049)Lunny Xiao2019-05-305-144/+134
| | | | | | | | * improve github downloader on migrations * fix tests * fix uppercase function parameters
* migrations: ensure rollback on error (#7039) (#7040)Rob Watson2019-05-251-1/+1
|
* fix missing repo description when migrating (#7000)Lunny Xiao2019-05-201-0/+3
|
* Improve migrations to support migrating ↵Lunny Xiao2019-05-0719-0/+2000
milestones/labels/issues/comments/pullrequests (#6290) * add migrations * fix package dependency * fix lints * implements migrations except pull requests * add releases * migrating releases * fix bug * fix lint * fix migrate releases * fix tests * add rollback * pull request migtations * fix import * fix go module vendor * add tests for upload to gitea * more migrate options * fix swagger-check * fix misspell * add options on migration UI * fix log error * improve UI options on migrating * add support for username password when migrating from github * fix tests * remove comments and fix migrate limitation * improve error handles * migrate API will also support migrate milestones/labels/issues/pulls/releases * fix tests and remove unused codes * add DownloaderFactory and docs about how to create a new Downloader * fix misspell * fix migration docs * Add hints about migrate options on migration page * fix tests