File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -344,7 +344,7 @@ def load_repos_info(channel_lookup):
344344 versioning_strategy = repo_info .get ("versioning_strategy" , FILE_VERSION ),
345345 )
346346 for repo_info in repos_info ["repos" ]
347- if repo_info .get ("repo_url" )
347+ if repo_info .get ("repo_url" ) and repo_info . get ( "channel_name" ) and channel_lookup . get ( repo_info . get ( "channel_name" ))
348348 ]
349349
350350 # some basic validation for sanity checking
Original file line number Diff line number Diff line change @@ -211,6 +211,21 @@ async def test_load_repos_info(mocker):
211211 "packaging_tool" : "none" ,
212212 "versioning_strategy" : FILE_VERSION ,
213213 },
214+ {
215+ "name" : "bad-no-channel" ,
216+ "repo_url" : "https://github.com/mitodl/ocw-hugo-projects.git" ,
217+ "project_type" : "library" ,
218+ "packaging_tool" : "none" ,
219+ "versioning_strategy" : FILE_VERSION ,
220+ },
221+ {
222+ "name" : "bad-nonexistant-channel" ,
223+ "repo_url" : "https://github.com/mitodl/ocw-hugo-projects.git" ,
224+ "channel_name" : "ghost-channel" ,
225+ "project_type" : "library" ,
226+ "packaging_tool" : "none" ,
227+ "versioning_strategy" : FILE_VERSION ,
228+ },
214229 ]
215230 },
216231 )
You can’t perform that action at this time.
0 commit comments