diff options
Diffstat (limited to 'models/commit_status.go')
-rw-r--r-- | models/commit_status.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/models/commit_status.go b/models/commit_status.go index df34b93ec5..bba39fde87 100644 --- a/models/commit_status.go +++ b/models/commit_status.go @@ -12,6 +12,7 @@ import ( "time" "code.gitea.io/gitea/models/db" + user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" @@ -32,7 +33,7 @@ type CommitStatus struct { Description string `xorm:"TEXT"` ContextHash string `xorm:"char(40) index"` Context string `xorm:"TEXT"` - Creator *User `xorm:"-"` + Creator *user_model.User `xorm:"-"` CreatorID int64 CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` @@ -127,7 +128,7 @@ func (status *CommitStatus) loadAttributes(e db.Engine) (err error) { } } if status.Creator == nil && status.CreatorID > 0 { - status.Creator, err = getUserByID(e, status.CreatorID) + status.Creator, err = user_model.GetUserByIDEngine(e, status.CreatorID) if err != nil { return fmt.Errorf("getUserByID [%d]: %v", status.CreatorID, err) } @@ -274,7 +275,7 @@ func FindRepoRecentCommitStatusContexts(repoID int64, before time.Duration) ([]s // NewCommitStatusOptions holds options for creating a CommitStatus type NewCommitStatusOptions struct { Repo *Repository - Creator *User + Creator *user_model.User SHA string CommitStatus *CommitStatus } |