File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,12 @@ def _is_not_assigned(project_item: ProjectItemInfo) -> bool:
36
36
return project_item .assignees .total_count < 1
37
37
38
38
39
+ def _has_no_milestone (project_item : ProjectItemInfo ) -> bool :
40
+ return project_item .milestone is None
41
+
42
+
39
43
CONDITION_CHECK_AND_WARNING_REASON_LIST = [
40
44
(_is_not_closed , "not closed" ),
41
45
(_is_not_assigned , "missing assignee" ),
46
+ (_has_no_milestone , "missing milestone" ),
42
47
]
Original file line number Diff line number Diff line change @@ -80,11 +80,16 @@ class AssigneesInfo(BaseModel):
80
80
total_count : NonNegativeInt = Field (alias = "totalCount" )
81
81
82
82
83
+ class MilestoneInfo (BaseModel ):
84
+ id : str
85
+
86
+
83
87
class ProjectItemInfo (BaseModel ):
84
88
assignees : AssigneesInfo
85
89
closed : bool
86
90
number : NonNegativeInt
87
91
repository : RepositoryInfo
92
+ milestone : MilestoneInfo | None
88
93
title : str
89
94
90
95
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ query projectV2Issues(
20
20
totalCount
21
21
}
22
22
number
23
+ milestone {
24
+ id
25
+ }
23
26
closed
24
27
title
25
28
repository {
@@ -31,6 +34,9 @@ query projectV2Issues(
31
34
totalCount
32
35
}
33
36
number
37
+ milestone {
38
+ id
39
+ }
34
40
closed
35
41
title
36
42
repository {
You can’t perform that action at this time.
0 commit comments