@@ -187,17 +187,37 @@ def check_todays_builds(self):
187187 tf .TestingFarmWatchResult .TESTS_ERROR ,
188188 tf .TestingFarmWatchResult .TESTS_FAILED ,
189189 ]:
190- if f"in_testing/{ chroot } " in labels_on_issue :
191- issue .remove_from_labels (f"in_testing/{ chroot } " )
192- if f"tested_on/{ chroot } " in labels_on_issue :
193- issue .remove_from_labels (f"tested_on/{ chroot } " )
194- issue .add_to_labels (f"failed_on/{ chroot } " )
190+ if (
191+ f"{ self .config .label_prefix_in_testing } { chroot } "
192+ in labels_on_issue
193+ ):
194+ issue .remove_from_labels (
195+ f"{ self .config .label_prefix_in_testing } { chroot } "
196+ )
197+ if (
198+ f"{ self .config .label_prefix_tested_on } { chroot } "
199+ in labels_on_issue
200+ ):
201+ issue .remove_from_labels (
202+ f"{ self .config .label_prefix_tested_on } { chroot } "
203+ )
204+ issue .add_to_labels (f"{ self .config .label_prefix_failed_on } { chroot } " )
195205 elif watch_result == tf .TestingFarmWatchResult .TESTS_PASSED :
196- if f"in_testing/{ chroot } " in labels_on_issue :
197- issue .remove_from_labels (f"in_testing/{ chroot } " )
198- if f"failed_on/{ chroot } " in labels_on_issue :
199- issue .remove_from_labels (f"failed_on/{ chroot } " )
200- issue .add_to_labels (f"tested_on/{ chroot } " )
206+ if (
207+ f"{ self .config .label_prefix_in_testing } { chroot } "
208+ in labels_on_issue
209+ ):
210+ issue .remove_from_labels (
211+ f"{ self .config .label_prefix_in_testing } { chroot } "
212+ )
213+ if (
214+ f"{ self .config .label_prefix_failed_on } { chroot } "
215+ in labels_on_issue
216+ ):
217+ issue .remove_from_labels (
218+ f"{ self .config .label_prefix_failed_on } { chroot } "
219+ )
220+ issue .add_to_labels (f"{ self .config .label_prefix_tested_on } { chroot } " )
201221 else :
202222 logging .info (f"Starting tests for chroot { chroot } " )
203223 request_id = tf .make_testing_farm_request (
@@ -207,7 +227,7 @@ def check_todays_builds(self):
207227 )
208228 logging .info (f"Request ID: { request_id } " )
209229 testing_farm_requests [chroot ] = request_id
210- issue .add_to_labels (f"in_testing/ { chroot } " )
230+ issue .add_to_labels (f"{ self . config . label_prefix_in_testing } { chroot } " )
211231
212232 if len (failed_test_cases ) > 0 :
213233 testing_farm_comment_body = f"""
@@ -244,10 +264,12 @@ def check_todays_builds(self):
244264 logging .info ("Checking if issue can be closed" )
245265 # issue.update()
246266 tested_chroot_labels = [
247- label .name for label in issue .labels if label .name .startswith ("tested_on/" )
267+ label .name
268+ for label in issue .labels
269+ if label .name .startswith ("{self.config.label_prefix_tested_on}" )
248270 ]
249271 required_chroot_abels = [
250- "tested_on/ {chroot}"
272+ "{self.config.label_prefix_tested_on} {chroot}"
251273 for chroot in all_chroots
252274 if tf .is_chroot_supported (chroot )
253275 ]
0 commit comments