1
1
mirror of https://github.com/go-gitea/gitea synced 2025-09-28 03:28:13 +00:00

Add builds UI

This commit is contained in:
Lunny Xiao
2022-05-03 16:03:24 +08:00
committed by Jason Song
parent 7732392a96
commit 5a479bb034
23 changed files with 599 additions and 50 deletions

View File

@@ -28,6 +28,7 @@ const (
TypeExternalTracker // 7 ExternalTracker
TypeProjects // 8 Kanban board
TypePackages // 9 Packages
TypeBuilds // 10 Builds
)
// Value returns integer value for unit type
@@ -55,6 +56,8 @@ func (u Type) String() string {
return "TypeProjects"
case TypePackages:
return "TypePackages"
case TypeBuilds:
return "TypeBuilds"
}
return fmt.Sprintf("Unknown Type %d", u)
}
@@ -78,6 +81,7 @@ var (
TypeExternalTracker,
TypeProjects,
TypePackages,
TypeBuilds,
}
// DefaultRepoUnits contains the default unit types
@@ -289,6 +293,15 @@ var (
perm.AccessModeRead,
}
UnitBuilds = Unit{
TypeBuilds,
"repo.builds",
"/builds",
"repo.builds.desc",
7,
perm.AccessModeOwner,
}
// Units contains all the units
Units = map[Type]Unit{
TypeCode: UnitCode,
@@ -300,6 +313,7 @@ var (
TypeExternalWiki: UnitExternalWiki,
TypeProjects: UnitProjects,
TypePackages: UnitPackages,
TypeBuilds: UnitBuilds,
}
)