diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2022-06-12 23:51:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-12 23:51:54 +0800 |
commit | 110fc57cbcf293c19ed7017d8ea528b4bbbd7396 (patch) | |
tree | b36eb2ee0e3f8417a35ad095e25880b778ded0ba /modules/convert/status.go | |
parent | a9dc9b06e4a4106ec8315fe7b2922efa440ca199 (diff) | |
download | gitea-110fc57cbcf293c19ed7017d8ea528b4bbbd7396.tar.gz gitea-110fc57cbcf293c19ed7017d8ea528b4bbbd7396.zip |
Move some code into models/git (#19879)
* Move access and repo permission to models/perm/access
* fix test
* Move some git related files into sub package models/git
* Fix build
* fix git test
* move lfs to sub package
* move more git related functions to models/git
* Move functions sequence
* Some improvements per @KN4CK3R and @delvh
Diffstat (limited to 'modules/convert/status.go')
-rw-r--r-- | modules/convert/status.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/convert/status.go b/modules/convert/status.go index 1ac2a0f3e1..7ed28a9c10 100644 --- a/modules/convert/status.go +++ b/modules/convert/status.go @@ -5,13 +5,13 @@ package convert import ( - "code.gitea.io/gitea/models" + git_model "code.gitea.io/gitea/models/git" user_model "code.gitea.io/gitea/models/user" api "code.gitea.io/gitea/modules/structs" ) -// ToCommitStatus converts models.CommitStatus to api.CommitStatus -func ToCommitStatus(status *models.CommitStatus) *api.CommitStatus { +// ToCommitStatus converts git_model.CommitStatus to api.CommitStatus +func ToCommitStatus(status *git_model.CommitStatus) *api.CommitStatus { apiStatus := &api.CommitStatus{ Created: status.CreatedUnix.AsTime(), Updated: status.CreatedUnix.AsTime(), @@ -32,7 +32,7 @@ func ToCommitStatus(status *models.CommitStatus) *api.CommitStatus { } // ToCombinedStatus converts List of CommitStatus to a CombinedStatus -func ToCombinedStatus(statuses []*models.CommitStatus, repo *api.Repository) *api.CombinedStatus { +func ToCombinedStatus(statuses []*git_model.CommitStatus, repo *api.Repository) *api.CombinedStatus { if len(statuses) == 0 { return nil } |