MCPcopy Create free account
hub / github.com/gogs/gogs / IsReleaseExist

Function IsReleaseExist

internal/database/release.go:107–113  ·  view source on GitHub ↗

IsReleaseExist returns true if release with given tag name already exists.

(repoID int64, tagName string)

Source from the content-addressed store, hash-verified

105
106// IsReleaseExist returns true if release with given tag name already exists.
107func IsReleaseExist(repoID int64, tagName string) (bool, error) {
108 if tagName == "" {
109 return false, nil
110 }
111
112 return x.Get(&Release{RepoID: repoID, LowerTagName: strings.ToLower(tagName)})
113}
114
115func createTag(gitRepo *git.Repository, r *Release) error {
116 // Only actual create when publish.

Callers 2

NewReleaseFunction · 0.85
GetReleaseFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected