Skip to content

Commit 41fc93f

Browse files
committed
Fix lint
1 parent d7cf560 commit 41fc93f

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

routers/api/v1/repo/repo.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
"time"
1313

1414
"code.gitea.io/gitea/models"
15-
"code.gitea.io/gitea/models/unit"
1615
unit_model "code.gitea.io/gitea/models/unit"
1716
"code.gitea.io/gitea/modules/context"
1817
"code.gitea.io/gitea/modules/convert"
@@ -791,10 +790,10 @@ func updateRepoUnits(ctx *context.APIContext, opts api.EditRepoOption) error {
791790
})
792791
deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeExternalTracker)
793792
} else if !*opts.HasIssues {
794-
if !unit.TypeExternalTracker.UnitGlobalDisabled() {
793+
if !unit_model.TypeExternalTracker.UnitGlobalDisabled() {
795794
deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeExternalTracker)
796795
}
797-
if !unit.TypeIssues.UnitGlobalDisabled() {
796+
if !unit_model.TypeIssues.UnitGlobalDisabled() {
798797
deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeIssues)
799798
}
800799
}
@@ -892,19 +891,19 @@ func updateRepoUnits(ctx *context.APIContext, opts api.EditRepoOption) error {
892891
Type: unit_model.TypePullRequests,
893892
Config: config,
894893
})
895-
} else if !*opts.HasPullRequests && !unit.TypePullRequests.UnitGlobalDisabled() {
896-
deleteUnitTypes = append(deleteUnitTypes, unit.TypePullRequests)
894+
} else if !*opts.HasPullRequests && !unit_model.TypePullRequests.UnitGlobalDisabled() {
895+
deleteUnitTypes = append(deleteUnitTypes, unit_model.TypePullRequests)
897896
}
898897
}
899898

900-
if opts.HasProjects != nil && !unit.TypeProjects.UnitGlobalDisabled() {
899+
if opts.HasProjects != nil && !unit_model.TypeProjects.UnitGlobalDisabled() {
901900
if *opts.HasProjects {
902901
units = append(units, models.RepoUnit{
903902
RepoID: repo.ID,
904-
Type: unit.TypeProjects,
903+
Type: unit_model.TypeProjects,
905904
})
906905
} else {
907-
deleteUnitTypes = append(deleteUnitTypes, unit.TypeProjects)
906+
deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeProjects)
908907
}
909908
}
910909

0 commit comments

Comments
 (0)