Add golangci #6418
|
@ -2516,7 +2516,7 @@ func (repo *Repository) GetUserFork(userID int64) (*Repository, error) {
|
|||
// CustomAvatarPath returns repository custom avatar file path.
|
||||
func (repo *Repository) CustomAvatarPath() string {
|
||||
// Avatar empty by default
|
||||
if len(repo.Avatar) <= 0 {
|
||||
if len(repo.Avatar) == 0 {
|
||||
return ""
|
||||
}
|
||||
return filepath.Join(setting.RepositoryAvatarUploadPath, repo.Avatar)
|
||||
|
@ -2528,7 +2528,7 @@ func (repo *Repository) CustomAvatarPath() string {
|
|||
func (repo *Repository) RelAvatarLink() string {
|
||||
// If no avatar - path is empty
|
||||
avatarPath := repo.CustomAvatarPath()
|
||||
if len(avatarPath) <= 0 {
|
||||
if len(avatarPath) == 0 {
|
||||
return ""
|
||||
}
|
||||
if !com.IsFile(avatarPath) {
|
||||
|
|
|
@ -631,15 +631,6 @@ func updateBasicProperties(ctx *context.APIContext, opts api.EditRepoOption) err
|
|||
return nil
|
||||
}
|
||||
|
||||
func unitTypeInTypes(unitType models.UnitType, unitTypes []models.UnitType) bool {
|
||||
for _, tp := range unitTypes {
|
||||
if unitType == tp {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// updateRepoUnits updates repo units: Issue settings, Wiki settings, PR settings
|
||||
func updateRepoUnits(ctx *context.APIContext, opts api.EditRepoOption) error {
|
||||
owner := ctx.Repo.Owner
|
||||
|
|
Reference in New Issue
Block a user