diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/migration/comment.go | 6 | ||||
-rw-r--r-- | modules/migration/issue.go | 6 | ||||
-rw-r--r-- | modules/migration/pullrequest.go | 6 | ||||
-rw-r--r-- | modules/migration/reaction.go | 6 | ||||
-rw-r--r-- | modules/migration/release.go | 6 | ||||
-rw-r--r-- | modules/migration/review.go | 6 |
6 files changed, 36 insertions, 0 deletions
diff --git a/modules/migration/comment.go b/modules/migration/comment.go index 234fea3e82..36277129d9 100644 --- a/modules/migration/comment.go +++ b/modules/migration/comment.go @@ -18,3 +18,9 @@ type Comment struct { Content string Reactions []*Reaction } + +// GetExternalName ExternalUserMigrated interface +func (c *Comment) GetExternalName() string { return c.PosterName } + +// ExternalID ExternalUserMigrated interface +func (c *Comment) GetExternalID() int64 { return c.PosterID } diff --git a/modules/migration/issue.go b/modules/migration/issue.go index 19781ad984..984f07d8c9 100644 --- a/modules/migration/issue.go +++ b/modules/migration/issue.go @@ -46,3 +46,9 @@ type Issue struct { Assignees []string `json:"assignees"` Context IssueContext `yaml:"-"` } + +// GetExternalName ExternalUserMigrated interface +func (i *Issue) GetExternalName() string { return i.PosterName } + +// GetExternalID ExternalUserMigrated interface +func (i *Issue) GetExternalID() int64 { return i.PosterID } diff --git a/modules/migration/pullrequest.go b/modules/migration/pullrequest.go index bbf1fe7653..7a681940a7 100644 --- a/modules/migration/pullrequest.go +++ b/modules/migration/pullrequest.go @@ -61,3 +61,9 @@ type PullRequestBranch struct { func (p PullRequestBranch) RepoPath() string { return fmt.Sprintf("%s/%s", p.OwnerName, p.RepoName) } + +// GetExternalName ExternalUserMigrated interface +func (p *PullRequest) GetExternalName() string { return p.PosterName } + +// ExternalID ExternalUserMigrated interface +func (p *PullRequest) GetExternalID() int64 { return p.PosterID } diff --git a/modules/migration/reaction.go b/modules/migration/reaction.go index 2ba44a15a2..0946bdd40b 100644 --- a/modules/migration/reaction.go +++ b/modules/migration/reaction.go @@ -10,3 +10,9 @@ type Reaction struct { UserName string `yaml:"user_name" json:"user_name"` Content string `json:"content"` } + +// GetExternalName ExternalUserMigrated interface +func (r *Reaction) GetExternalName() string { return r.UserName } + +// GetExternalID ExternalUserMigrated interface +func (r *Reaction) GetExternalID() int64 { return r.UserID } diff --git a/modules/migration/release.go b/modules/migration/release.go index a83f5502cb..cbdf01a3ed 100644 --- a/modules/migration/release.go +++ b/modules/migration/release.go @@ -38,3 +38,9 @@ type Release struct { Created time.Time Published time.Time } + +// GetExternalName ExternalUserMigrated interface +func (r *Release) GetExternalName() string { return r.PublisherName } + +// GetExternalID ExternalUserMigrated interface +func (r *Release) GetExternalID() int64 { return r.PublisherID } diff --git a/modules/migration/review.go b/modules/migration/review.go index d6d15002af..85795385e9 100644 --- a/modules/migration/review.go +++ b/modules/migration/review.go @@ -28,6 +28,12 @@ type Review struct { Comments []*ReviewComment } +// GetExternalName ExternalUserMigrated interface +func (r *Review) GetExternalName() string { return r.ReviewerName } + +// ExternalID ExternalUserMigrated interface +func (r *Review) GetExternalID() int64 { return r.ReviewerID } + // ReviewComment represents a review comment type ReviewComment struct { ID int64 |