@@ -24,6 +24,8 @@ async def getiter(self, url, url_vars={}):
2424 self .getiter_url = sansio .format_url (url , url_vars )
2525 to_iterate = self ._getiter_return [self .getiter_url ]
2626 for item in to_iterate :
27+ if isinstance (item , Exception ):
28+ raise item
2729 yield item
2830
2931 async def getitem (self , url , url_vars = {}):
@@ -1096,17 +1098,21 @@ async def test_awaiting_label_not_removed_when_pr_not_merged(label):
10961098 await awaiting .router .dispatch (event , gh )
10971099 assert gh .delete_url is None
10981100
1101+
10991102@pytest .mark .parametrize ("issue_url_key" , ["url" , "issue_url" ])
1100- async def test_new_commit_pushed_to_approved_pr (issue_url_key ):
1103+ @pytest .mark .parametrize ("repo_full_name" , ["mariatta/cpython" , "python/cpython" ])
1104+ async def test_new_commit_pushed_to_approved_pr (issue_url_key , repo_full_name ):
11011105 # There is new commit on approved PR
11021106 username = "brettcannon"
11031107 sha = "f2393593c99dd2d3ab8bfab6fcc5ddee540518a9"
1104- data = {"commits" : [{"id" : sha }]}
1108+ data = {"commits" : [{"id" : sha }],
1109+ "repository" : {"full_name" : repo_full_name },
1110+ }
11051111 event = sansio .Event (data , event = "push" , delivery_id = "12345" )
11061112 teams = [{"name" : "python core" , "id" : 6 }]
11071113 items = {
11081114 f"https://api.github.com/teams/6/memberships/{ username } " : "OK" ,
1109- f"https://api.github.com/search/issues?q=type:pr+repo:python/cpython +sha:{ sha } " : {
1115+ f"https://api.github.com/search/issues?q=type:pr+repo:{ repo_full_name } +sha:{ sha } " : {
11101116 "total_count" : 1 ,
11111117 "items" : [
11121118 {
@@ -1169,14 +1175,18 @@ async def test_new_commit_pushed_to_approved_pr(issue_url_key):
11691175 )
11701176 }
11711177
1178+
11721179@pytest .mark .parametrize ("issue_url_key" , ["url" , "issue_url" ])
1173- async def test_new_commit_pushed_to_not_approved_pr (issue_url_key ):
1180+ @pytest .mark .parametrize ("repo_full_name" , ["mariatta/cpython" , "python/cpython" ])
1181+ async def test_new_commit_pushed_to_not_approved_pr (issue_url_key , repo_full_name ):
11741182 # There is new commit on approved PR
11751183 sha = "f2393593c99dd2d3ab8bfab6fcc5ddee540518a9"
1176- data = {"commits" : [{"id" : sha }]}
1184+ data = {"commits" : [{"id" : sha }],
1185+ "repository" : {"full_name" : repo_full_name },
1186+ }
11771187 event = sansio .Event (data , event = "push" , delivery_id = "12345" )
11781188 items = {
1179- f"https://api.github.com/search/issues?q=type:pr+repo:python/cpython +sha:{ sha } " : {
1189+ f"https://api.github.com/search/issues?q=type:pr+repo:{ repo_full_name } +sha:{ sha } " : {
11801190 "total_count" : 1 ,
11811191 "items" : [
11821192 {
0 commit comments