mirror of https://github.com/go-gitea/gitea.git
Allow migration items with mirroring for GitHub
This commit is contained in:
parent
40c3b32ea5
commit
039e505ec9
|
@ -161,14 +161,6 @@ func Migrate(ctx *context.APIContext) {
|
|||
GitServiceType: gitServiceType,
|
||||
MirrorInterval: form.MirrorInterval,
|
||||
}
|
||||
if opts.Mirror {
|
||||
opts.Issues = false
|
||||
opts.Milestones = false
|
||||
opts.Labels = false
|
||||
opts.Comments = false
|
||||
opts.PullRequests = false
|
||||
opts.Releases = false
|
||||
}
|
||||
|
||||
repo, err := repo_module.CreateRepository(ctx.Doer, repoOwner, models.CreateRepoOptions{
|
||||
Name: opts.RepoName,
|
||||
|
|
|
@ -44,7 +44,8 @@ function checkItems(tokenAuth) {
|
|||
enableItems = $user.val() !== '' || $pass.val() !== '';
|
||||
}
|
||||
if (enableItems && $service.val() > 1) {
|
||||
if ($mirror.is(':checked')) {
|
||||
const allowedServices = [2]; // services that supports migration items with mirroring
|
||||
if ($mirror.is(':checked') && !allowedServices.includes(Number($service.val()))) {
|
||||
$items.not('[name="wiki"]').attr('disabled', true);
|
||||
$items.filter('[name="wiki"]').attr('disabled', false);
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue