aboutsummaryrefslogtreecommitdiffstats
path: root/services/migrations
Commit message (Collapse)AuthorAgeFilesLines
* ignore DNS error when doing migration allow/block check (#19567)wxiaoguang2022-05-021-4/+3
| | | Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix migrate release from github (#19510) (#19523)Lunny Xiao2022-04-271-9/+12
| | | | | * Fix migrate release from github * Fix bug
* Add notags to fetch (#19487) (#19490)65432022-04-251-23/+21
| | | | | * Add notags to fetch (#19487) * gofumpt
* User specific repoID or xorm builder conditions for issue search (#19475) ↵65432022-04-251-1/+1
| | | | (#19476)
* Make migrations SKIP_TLS_VERIFY apply to git too (#19132) (#19141)zeripath2022-03-191-14/+15
| | | | | | | | | | Backport #19132 Make SKIP_TLS_VERIFY apply to git data migrations too through adding the `-c http.sslVerify=false` option to the git clone command. Fix #18998 Signed-off-by: Andrew Thornton <art27@cantab.net>
* GitLab reviews may not have the updated_at field set (#18450) (#18461)Aravinth Manivannan2022-01-303-33/+181
| | | | | | | | | | | | Fallback to created_at if that the case and to time.Now() if it is also missing. Fixes: #18434 Co-authored-by: Loïc Dachary <loic@dachary.org> Conflicts: services/migrations/gitlab.go trivial context conflict because var reviews became reviews := in 1.17
* Fix restore without topic failure (#18387) (#18400)Lunny Xiao2022-01-251-0/+3
| | | | Co-authored-by: zeripath <art27@cantab.net>
* Fix CheckRepoStats and reuse it during migration (#18264)Aravinth Manivannan2022-01-171-0/+4
| | | | | | | | | | | | | | | | | | | The CheckRepoStats function missed the following counters: - label num_closed_issues & num_closed_pulls - milestone num_closed_issues & num_closed_pulls The update SQL statements for updating the repository num_closed_issues & num_closed_pulls fields were repeated in three functions (repo.CheckRepoStats, migrate.insertIssues and models.Issue.updateClosedNum) and were moved to a single helper. The UpdateRepoStats is implemented and called in the Finish migration method so that it happens immediately instead of wating for the CheckRepoStats to run. Signed-off-by: Loïc Dachary loic@dachary.org --- [source](https://lab.forgefriends.org/forgefriends/forgefriends/-/merge_requests/34)
* Fix various typos (#18219)luzpaz2022-01-103-4/+4
| | | | | Found via `codespell -q 3 -S ./options/locale,./vendor -L ba,pullrequest,pullrequests,readby,te,unknwon` Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* refactoring nits (#18188)65432022-01-053-18/+20
| | | | | | | * no octal for time values * rm artifact from refactoring Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Do not read or write git reference files directly (#18079)zeripath2021-12-231-2/+1
| | | | | | | | | | Git will and can pack references into packfiles and therefore if you write/read the files directly you will get false results. Instead you should use update-ref and show-ref. To that end I have created three new functions in git/repo_commit.go that will do this correctly. Related #17191 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Simplify parameter types (#18006)Gusted2021-12-202-2/+2
| | | Remove repeated type declarations in function definitions.
* Some repository refactors (#17950)Lunny Xiao2021-12-121-2/+2
| | | | | | | | | * some repository refactors * remove unnecessary code * Fix test * Remove unnecessary banner
* Move repository model into models/repo (#17933)Lunny Xiao2021-12-103-8/+10
| | | | | | | | | | | | | | | * Some refactors related repository model * Move more methods out of repository * Move repository into models/repo * Fix test * Fix test * some improvements * Remove unnecessary function
* Add migrate from Codebase (#16768)KN4CK3R2021-12-023-0/+807
| | | | | | | | | | This PR adds [Codebase](https://www.codebasehq.com/) as migration source. Supported: - Milestones - Issues - Pull Requests - Comments - Labels
* Move more model into models/user (#17826)Lunny Xiao2021-11-282-10/+11
| | | | | | | | * Move more model into models/user * Remove unnecessary comment Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Move user related model into models/user (#17781)Lunny Xiao2021-11-245-11/+14
| | | | | | | | | | | | | * Move user related model into models/user * Fix lint for windows * Fix windows lint * Fix windows lint * Move some tests in models * Merge
* Use new OneDev /milestones endpoint (#17782)KN4CK3R2021-11-231-2/+18
| | | OneDev changed the API which fails every build at the moment.
* Use `hostmatcher` to replace `matchlist`, improve security (#17605)wxiaoguang2021-11-208-96/+93
| | | | | Use hostmacher to replace matchlist. And we introduce a better DialContext to do a full host/IP check, otherwise the attackers can still bypass the allow/block list by a 302 redirection.
* Move attachment into models/repo/ (#17650)Lunny Xiao2021-11-191-1/+2
| | | | | | | * Move attachment into models/repo/ * Fix test * Fix bug
* Fix Migrate Description (#17692)99rgosse2021-11-181-0/+1
| | | | | Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Move user functions into user.go (#17659)Lunny Xiao2021-11-182-5/+6
| | | | | * Move user functions into user.go * Fix test
* Move migrations into services and base into modules/migration (#17663)Lunny Xiao2021-11-1621-0/+7602
* Move migrtions into services and base into modules/migration * Fix imports * Fix lint