File tree Expand file tree Collapse file tree 4 files changed +13
-1
lines changed Expand file tree Collapse file tree 4 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 44class BranchStatus (InfrahubStringEnum ):
55 OPEN = "OPEN"
66 NEED_REBASE = "NEED_REBASE"
7- CLOSED = "CLOSED"
87 DELETING = "DELETING"
Original file line number Diff line number Diff line change 77from infrahub .core .branch import Branch
88from infrahub .core .constants import GLOBAL_BRANCH_NAME
99
10+ from .enums import InfrahubBranchStatus
1011from .standard_node import InfrahubObjectType
1112
1213if TYPE_CHECKING :
@@ -19,6 +20,7 @@ class BranchType(InfrahubObjectType):
1920 description = String (required = False )
2021 origin_branch = String (required = False )
2122 branched_from = String (required = False )
23+ status = InfrahubBranchStatus (required = True )
2224 created_at = String (required = False )
2325 sync_with_git = Boolean (required = False )
2426 is_default = Boolean (required = False )
Original file line number Diff line number Diff line change 11from graphene import Enum
22
33from infrahub .core import constants
4+ from infrahub .core .branch .enums import BranchStatus
45from infrahub .permissions import constants as permission_constants
56
67CheckType = Enum .from_enum (constants .CheckType )
1011Severity = Enum .from_enum (constants .Severity )
1112
1213BranchRelativePermissionDecision = Enum .from_enum (permission_constants .BranchRelativePermissionDecision )
14+
15+ InfrahubBranchStatus = Enum .from_enum (BranchStatus )
Original file line number Diff line number Diff line change @@ -150,6 +150,7 @@ type Branch {
150150 is_isolated: Boolean @deprecated(reason: "non isolated mode is not supported anymore")
151151 name: String!
152152 origin_branch: String
153+ status: BranchStatus!
153154 sync_with_git: Boolean
154155}
155156
@@ -318,6 +319,13 @@ enum BranchRelativePermissionDecision {
318319 DENY
319320}
320321
322+ """An enumeration."""
323+ enum BranchStatus {
324+ DELETING
325+ NEED_REBASE
326+ OPEN
327+ }
328+
321329type BranchUpdate {
322330 ok: Boolean
323331}
You can’t perform that action at this time.
0 commit comments