diff options
Diffstat (limited to 'models/release.go')
-rw-r--r-- | models/release.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/models/release.go b/models/release.go index 51ac0426ac..0285f6bd5e 100644 --- a/models/release.go +++ b/models/release.go @@ -456,3 +456,20 @@ func SaveOrUpdateTag(repo *repo_model.Repository, newRel *Release) error { } return nil } + +// RemapExternalUser ExternalUserRemappable interface +func (r *Release) RemapExternalUser(externalName string, externalID, userID int64) error { + r.OriginalAuthor = externalName + r.OriginalAuthorID = externalID + r.PublisherID = userID + return nil +} + +// UserID ExternalUserRemappable interface +func (r *Release) GetUserID() int64 { return r.PublisherID } + +// ExternalName ExternalUserRemappable interface +func (r *Release) GetExternalName() string { return r.OriginalAuthor } + +// ExternalID ExternalUserRemappable interface +func (r *Release) GetExternalID() int64 { return r.OriginalAuthorID } |