summaryrefslogtreecommitdiffstats
path: root/services/release/release.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/release/release.go')
-rw-r--r--services/release/release.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/release/release.go b/services/release/release.go
index ec1494d426..e20b91ece0 100644
--- a/services/release/release.go
+++ b/services/release/release.go
@@ -31,7 +31,7 @@ func createTag(gitRepo *git.Repository, rel *models.Release, msg string) (bool,
return false, err
}
- protectedTags, err := rel.Repo.GetProtectedTags()
+ protectedTags, err := models.GetProtectedTags(rel.Repo.ID)
if err != nil {
return false, fmt.Errorf("GetProtectedTags: %v", err)
}
@@ -137,7 +137,7 @@ func CreateRelease(gitRepo *git.Repository, rel *models.Release, attachmentUUIDs
}
// CreateNewTag creates a new repository tag
-func CreateNewTag(doer *user_model.User, repo *models.Repository, commit, tagName, msg string) error {
+func CreateNewTag(doer *user_model.User, repo *repo_model.Repository, commit, tagName, msg string) error {
isExist, err := models.IsReleaseExist(repo.ID, tagName)
if err != nil {
return err
@@ -285,7 +285,7 @@ func DeleteReleaseByID(id int64, doer *user_model.User, delTag bool) error {
return fmt.Errorf("GetReleaseByID: %v", err)
}
- repo, err := models.GetRepositoryByID(rel.RepoID)
+ repo, err := repo_model.GetRepositoryByID(rel.RepoID)
if err != nil {
return fmt.Errorf("GetRepositoryByID: %v", err)
}