File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -107,13 +107,18 @@ def get_todays_github_issue(
107
107
# label:broken_snapshot_detected
108
108
query = f"is:issue repo:{ github_repo } author:{ creator } label:strategy/{ strategy } { self .config .yyyymmdd } in:title"
109
109
issues = self .github .search_issues (query )
110
- if issues is not None and issues .totalCount > 0 :
110
+ if issues is None :
111
+ logging .info (f"Found no issue for today ({ self .config .yyyymmdd } )" )
112
+ return None
113
+
114
+ # This is a hack: normally the PaginagedList[Issue] type handles this
115
+ # for us but without this hack no issue being found.
116
+ issues .get_page (0 )
117
+ if issues .totalCount > 0 :
111
118
logging .info (
112
119
f"Found today's ({ self .config .yyyymmdd } ) issue: { issues [0 ].html_url } "
113
120
)
114
121
return issues [0 ]
115
- logging .info (f"Found no issue for today ({ self .config .yyyymmdd } )" )
116
- return None
117
122
118
123
@property
119
124
def initial_comment (self ) -> str :
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ def test_make_with_missing_compose(self):
25
25
issue = gh .get_todays_github_issue (
26
26
strategy = "big-merge" , github_repo = "fedora-llvm-team/llvm-snapshots"
27
27
)
28
+ assert issue is not None
28
29
29
30
with self .assertRaises (SystemError ):
30
31
tf .TestingFarmRequest .make (
You can’t perform that action at this time.
0 commit comments