aboutsummaryrefslogtreecommitdiffstats
path: root/modules/migrations/github_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Move migrations into services and base into modules/migration (#17663)Lunny Xiao2021-11-161-430/+0
| | | | | | | * Move migrtions into services and base into modules/migration * Fix imports * Fix lint
* Add migrate from OneDev (#16356)KN4CK3R2021-08-221-3/+5
| | | | | | | | | | | | | | * Use context to simplify logic. * Added migration from OneDev. This PR adds [OneDev](https://code.onedev.io/) as migration source. Supported: - [x] Milestones - [x] Issues - [x] Pull Requests - [x] Comments - [x] Reviews - [x] Labels
* Refactored and fixed migration tests. (#16714)KN4CK3R2021-08-171-111/+80
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Make the github migration less rate limit waiting to get comment per page ↵Lunny Xiao2021-06-301-1/+3
| | | | | | | | | | | | | | | from repository but not per issue (#16070) * Make the github migration less rate limit waiting to get comment per page from repository but not per issue * Fix lint * adjust Downloader interface * Fix missed reviews * Fix test * Remove unused struct
* Fixed assert statements. (#16089)KN4CK3R2021-06-071-3/+3
|
* Gitea 2 Gitea migration (#12657)65432020-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * first draft * update gitea sdk to 9e280adb4da * adapt feat of updated sdk * releases now works * break the Reactions loop * use convertGiteaLabel * fix endless loop because paggination is not supported there !!! * rename gitea local uploader files * pagination can bite you in the ass * Version Checks * lint * docs * rename gitea sdk import to miss future conficts * go-swagger: dont scan the sdk structs * make sure gitea can shutdown gracefully * make GetPullRequests and GetIssues similar * rm useles * Add Test: started ... * ... add tests ... * Add tests and Fixing things * Workaround missing SHA * Adapt: Ensure that all migration requests are cancellable (714ab71ddc4260937b1480519d453d2dc4e77dd6) * LINT: fix misspells in test set * adapt ListMergeRequestAwardEmoji * update sdk * Return error when creating giteadownloader failed * update sdk * adapt new sdk * adopt new features * check version before err * adapt: 'migrate service type switch page' * optimize * Fix DefaultBranch * impruve * handle subPath * fix test * Fix ReviewCommentPosition * test GetReviews * add DefaultBranch int test set * rm unused * Update SDK to v0.13.0 * addopt sdk changes * found better link * format template * Update Docs * Update Gitea SDK (v0.13.1)
* Hopefully support GH enterprise (#12863)John Olheiser2020-09-211-1/+1
| | | | | | Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* On Migration respect old DefaultBranch (#12843)65432020-09-151-5/+6
| | | | | | | * On Migration respect old DefaultBranch * add DefaultBranch int test set Co-authored-by: zeripath <art27@cantab.net>
* Ensure that all migration requests are cancellable (#12669)zeripath2020-09-021-1/+2
| | | | | | | | | | | * Ensure that all migration requests are cancellable Signed-off-by: Andrew Thornton <art27@cantab.net> * Use WithContext as RequestWithContext is go 1.14 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Git migration UX (#12619)John Olheiser2020-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Implementation Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix gitlab and token cloning Signed-off-by: jolheiser <john.olheiser@gmail.com> * Imports and JS Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Linting Signed-off-by: jolheiser <john.olheiser@gmail.com> * Generate swagger Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move mirror toggle and rename options Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Migrate reviews when migrating repository from github (#9463)Lunny Xiao2020-01-231-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* tests: configure github remaining limit + read token (#9800)Antoine GIRARD2020-01-161-1/+6
| | | | | | | | | | | | | | | | | | * 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-151-33/+56
| | | | | | | | | | | | | | | | | | | | * 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-141-0/+6
| | | | | | | | * 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>
* 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
* Add extra user information when migrating release (#8331)Lunny Xiao2019-10-051-0/+2
| | | | | | | | * add extra user information when migrating release * add migrations * fix tests
* Import topics during migration (#7851)Antoine GIRARD2019-08-141-0/+4
| | | | | | | | * add GetTopics interface * CreateTopics * remove un-needed comment
* 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-081-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Use batch insert on migrating repository to make the process faster (#7050)Lunny Xiao2019-06-291-0/+3
| | | | | | | | | | * Use batch insert on migrating repository to make the process faster * fix lint * fix tests * fix comments
* improve github downloader on migrations (#7049)Lunny Xiao2019-05-301-2/+4
| | | | | | | | * improve github downloader on migrations * fix tests * fix uppercase function parameters
* Improve migrations to support migrating ↵Lunny Xiao2019-05-071-0/+448
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