@@ -57,10 +57,9 @@ async def run(self):
5757 )
5858
5959 def is_coverage_task (self , task ):
60- name = task ["task" ]["metadata" ]["name" ]
61- return name .startswith ("build-" ) and "ccov" in name .split ("/" )[0 ].split ("-" )
60+ return "ccov" in task ["task" ]["metadata" ]["name" ].split ("/" )[0 ].split ("-" )
6261
63- async def get_build_task_in_group (self , group_id ):
62+ async def get_coverage_task_in_group (self , group_id ):
6463 if group_id in self .triggered_groups :
6564 logger .info (
6665 "Received duplicated groupResolved notification" , group = group_id
@@ -118,11 +117,11 @@ async def parse(self, body):
118117 )
119118 return None
120119
121- build_task = await self .get_build_task_in_group (taskGroupId )
122- if build_task is None :
120+ coverage_task = await self .get_coverage_task_in_group (taskGroupId )
121+ if coverage_task is None :
123122 return None
124123
125- repository = build_task ["task" ]["payload" ]["env" ]["GECKO_HEAD_REPOSITORY" ]
124+ repository = coverage_task ["task" ]["payload" ]["env" ]["GECKO_HEAD_REPOSITORY" ]
126125
127126 if repository not in [
128127 "https://hg.mozilla.org/mozilla-central" ,
@@ -134,19 +133,16 @@ async def parse(self, body):
134133 )
135134 return None
136135
136+ revision = coverage_task ["task" ]["payload" ]["env" ]["GECKO_HEAD_REV" ]
137+
137138 logger .info (
138139 "Received groupResolved notification for coverage builds" ,
139140 repository = repository ,
140- revision = build_task [ "task" ][ "payload" ][ "env" ][ "GECKO_HEAD_REV" ] ,
141+ revision = revision ,
141142 group = taskGroupId ,
142143 )
143144
144- return [
145- {
146- "REPOSITORY" : repository ,
147- "REVISION" : build_task ["task" ]["payload" ]["env" ]["GECKO_HEAD_REV" ],
148- }
149- ]
145+ return [{"REPOSITORY" : repository , "REVISION" : revision }]
150146
151147
152148class Events (object ):
0 commit comments