zeripath
722a7c902d
Add Close() method to gogitRepository ( #8901 )
...
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
5 years ago
mrsdizzie
3ddca774fc
Update Github Migration Tests ( #8938 )
...
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
5 years ago
mrsdizzie
c54145174f
Update Github migration test ( #8893 )
...
* 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
5 years ago
Lauris BH
45f219239e
Fix to close opened io resources as soon as not needed ( #8839 )
...
* Fix to close opened io resources as soon as not needed
* Remove unneeded err checks
5 years ago
Lunny Xiao
945f121262
Fix bug on pull requests when transfer head repository ( #8564 )
...
* fix bug on pull requests when transfer head repository
* add migration and fix lint
* fix tests and add a cache check on LoadBaseRepo
5 years ago
Wenxuan Zhao
cf42cb0ae6
Allow externalID to be UUID ( #8551 )
...
Signed-off-by: Wenxuan Zhao <viz@linux.com>
5 years ago
Lunny Xiao
e3e44a59d0
Update migrated repositories' issues/comments/prs poster id if user has a 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
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
Lunny Xiao
bd41a04a56
Add extra user information when migrating release ( #8331 )
...
* add extra user information when migrating release
* add migrations
* fix tests
5 years ago
Lunny Xiao
ed58919bfc
fix bug when migrating a private repository ( #7917 )
5 years ago
Lunny Xiao
85202d4784
Display ui time with customize time location ( #7792 )
...
* 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
5 years ago
Antoine GIRARD
46d6b92ad0
Import topics during migration ( #7851 )
...
* add GetTopics interface
* CreateTopics
* remove un-needed comment
5 years ago
Lunny Xiao
a94ae7acb0
fix bug on migrating milestone from github ( #7665 )
5 years ago
Lunny Xiao
2739a0be98
only create opened pull request when migrating from github ( #7463 )
5 years ago
Lunny Xiao
427a161c67
Fix migration tests since #7 fixed ( #7375 )
...
* fix migration tests since #7 fixed
* fix test time
5 years ago
mrsdizzie
1f1ecda541
Display original author and URL information when showing migrated 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
5 years ago
mrsdizzie
7166629d9c
Fix typo in PR migration check ( #7368 )
5 years ago
Lunny Xiao
337d6915ff
Detect migrating batch size ( #7353 )
...
* Make migrating batch size as configurable
* detect different table batch insert size and remove config item
* remove unrelated changes
5 years ago
Lunny Xiao
e728b55812
Fix bug conflict between SyncReleasesWithTags and InsertReleases ( #7337 )
...
* fix bug conflict between SyncReleasesWithTags and InsertReleases
* fix tests
* fix fmt
5 years ago
Lunny Xiao
462284e2f5
Use batch insert on migrating repository to make the process faster ( #7050 )
...
* Use batch insert on migrating repository to make the process faster
* fix lint
* fix tests
* fix comments
5 years ago
Lunny Xiao
392fe6c943
Fix migration panic when Head.User is not exist ( #7226 )
...
* fix migration panic when Head.User is not exist
* fix test
6 years ago
Lunny Xiao
7d12ec2abd
improve github downloader on migrations ( #7049 )
...
* improve github downloader on migrations
* fix tests
* fix uppercase function parameters
6 years ago
Rob Watson
daaae2aad5
migrations: ensure rollback on error ( #7039 ) ( #7040 )
6 years ago
Lunny Xiao
02542a2c15
fix missing repo description when migrating ( #7000 )
6 years ago
Lunny Xiao
08069dc465
Improve migrations to support migrating 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
6 years ago