mirror of https://github.com/go-gitea/gitea
Add sync items to Mirror struct
This commit is contained in:
parent
4f67c5d5ca
commit
bbd464857c
|
@ -27,6 +27,14 @@ type Mirror struct {
|
|||
Interval time.Duration
|
||||
EnablePrune bool `xorm:"NOT NULL DEFAULT true"`
|
||||
|
||||
SyncWiki bool
|
||||
SyncIssues bool
|
||||
SyncMilestones bool
|
||||
SyncLabels bool
|
||||
SyncReleases bool
|
||||
SyncComments bool
|
||||
SyncPullRequests bool
|
||||
|
||||
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX"`
|
||||
NextUpdateUnix timeutil.TimeStamp `xorm:"INDEX"`
|
||||
|
||||
|
|
|
@ -177,11 +177,18 @@ func MigrateRepositoryGitData(ctx context.Context, u *user_model.User,
|
|||
|
||||
if opts.Mirror {
|
||||
mirrorModel := repo_model.Mirror{
|
||||
RepoID: repo.ID,
|
||||
Interval: setting.Mirror.DefaultInterval,
|
||||
EnablePrune: true,
|
||||
NextUpdateUnix: timeutil.TimeStampNow().AddDuration(setting.Mirror.DefaultInterval),
|
||||
LFS: opts.LFS,
|
||||
RepoID: repo.ID,
|
||||
Interval: setting.Mirror.DefaultInterval,
|
||||
SyncWiki: opts.Wiki,
|
||||
SyncIssues: opts.Issues,
|
||||
SyncMilestones: opts.Milestones,
|
||||
SyncLabels: opts.Labels,
|
||||
SyncReleases: opts.Releases,
|
||||
SyncComments: opts.Comments,
|
||||
SyncPullRequests: opts.PullRequests,
|
||||
EnablePrune: true,
|
||||
NextUpdateUnix: timeutil.TimeStampNow().AddDuration(setting.Mirror.DefaultInterval),
|
||||
LFS: opts.LFS,
|
||||
}
|
||||
if opts.LFS {
|
||||
mirrorModel.LFSEndpoint = opts.LFSEndpoint
|
||||
|
|
Loading…
Reference in New Issue