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

Function isRepositoryExist

internal/database/repo.go:729–735  ·  view source on GitHub ↗
(e Engine, u *User, repoName string)

Source from the content-addressed store, hash-verified

727}
728
729func isRepositoryExist(e Engine, u *User, repoName string) (bool, error) {
730 has, err := e.Get(&Repository{
731 OwnerID: u.ID,
732 LowerName: strings.ToLower(repoName),
733 })
734 return has && com.IsDir(RepoPath(u.Name, repoName)), err
735}
736
737// IsRepositoryExist returns true if the repository with given name under user has already existed.
738func IsRepositoryExist(u *User, repoName string) (bool, error) {

Callers 2

IsRepositoryExistFunction · 0.85
createRepositoryFunction · 0.85

Calls 2

RepoPathFunction · 0.85
GetMethod · 0.65

Tested by

no test coverage detected