Bo-Yi Wu
167b0f46ef
chore(models): rewrite code format. ( #14754 )
...
* chore: rewrite format.
* chore: update format
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* chore: update format
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* chore: Adjacent parameters with the same type should be grouped together
* chore: update format.
4 years ago
zeripath
f0e15250b9
Migrate to use jsoniter instead of encoding/json ( #14841 )
...
* Migrate to use jsoniter
* fix tests
* update gitea.com/go-chi/binding
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
4 years ago
Lunny Xiao
dd08853b10
Dump github/gitlab/gitea repository data to a local directory and restore to gitea ( #12244 )
...
* Dump github/gitlab repository data to a local directory
* Fix lint
* Adjust directory structure
* Allow migration special units
* Allow migration ignore release assets
* Fix lint
* Add restore repository
* stage the changes
* Merge
* Fix lint
* Update the interface
* Add some restore methods
* Finish restore
* Add comments
* Fix restore
* Add a token flag
* Fix bug
* Fix test
* Fix test
* Fix bug
* Fix bug
* Fix lint
* Fix restore
* refactor downloader
* fmt
* Fix bug isEnd detection on getIssues
* Refactor maxPerPage
* Remove unused codes
* Remove unused codes
* Fix bug
* Fix restore
* Fix dump
* Uploader should not depend downloader
* use release attachment name but not id
* Fix restore bug
* Fix lint
* Fix restore bug
* Add a method of DownloadFunc for base.Release to make uploader not depend on downloader
* fix Release yml marshal
* Fix trace information
* Fix bug when dump & restore
* Save relative path on yml file
* Fix bug
* Use relative path
* Update docs
* Use git service string but not int
* Recognize clone addr to service type
4 years ago
zeripath
f40a2a4404
Store task errors following migrations and display them ( #13246 )
...
* Store task errors following migrations and display them
When migrate tasks fail store the error in the task table
and ensure that they show on the status page.
Fix #13242
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update web_src/js/index.js
* Hide the failed first
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
6543
fd60ebfe14
[API] Migration: Change ServiceType String ( #12672 )
...
* use different structs for MigrateRepoOptions on UI and API
* Fix TokenAuth and rename UID to an understandable Name
* fix swagger doc
* simplify & mk redable
* R E F A C T O R:
migration has now internal 3 structs to store its options:
* the Options for WebUI: modules/auth/repo_form.go
* the Options for API: modules/structs/repo.go
* the option struct with after validation for internal prossessing: modules/migrations/base/options.go
* Copyright Header
* Deprecate UID - add RepoOwner
* adopt repo.go -> migrate.go
* add comment about each struct purpose
* lint
4 years ago
Lunny Xiao
b465d0d787
Move create/fork repository from models to modules/repository ( #9489 )
...
* 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
5 years ago
Lunny Xiao
7a3a90aca3
Fix wrong original git service type on a migrated repository ( #9693 )
5 years ago
Jordan
1615b3c187
Hide given credentials for migrated repos. ( #9097 )
...
CloneAddr was being saved as OriginalURL.
Now passing OriginalURL through from the form and
saving it in it's place
5 years ago
Lunny Xiao
f2a3abc683
Move migrating repository from frontend to backend ( #6200 )
...
* 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
5 years ago