diff options
Diffstat (limited to 'models/review.go')
-rw-r--r-- | models/review.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/models/review.go b/models/review.go index 8b0092b1ed..22c47486a1 100644 --- a/models/review.go +++ b/models/review.go @@ -987,3 +987,20 @@ func (r *Review) HTMLURL() string { } return comment.HTMLURL() } + +// RemapExternalUser ExternalUserRemappable interface +func (r *Review) RemapExternalUser(externalName string, externalID, userID int64) error { + r.OriginalAuthor = externalName + r.OriginalAuthorID = externalID + r.ReviewerID = userID + return nil +} + +// GetUserID ExternalUserRemappable interface +func (r *Review) GetUserID() int64 { return r.ReviewerID } + +// GetExternalName ExternalUserRemappable interface +func (r *Review) GetExternalName() string { return r.OriginalAuthor } + +// GetExternalID ExternalUserRemappable interface +func (r *Review) GetExternalID() int64 { return r.OriginalAuthorID } |