File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -229,20 +229,20 @@ def _main_prog():
229
229
word_matches = keyword_pattern .finditer (pr_msg_lower , re .IGNORECASE )
230
230
231
231
#Go through all matches to pull out PR and issue numbers:
232
- found_ids = []
232
+ found_ids = set ()
233
233
for match in word_matches :
234
234
issue_dict = match .groupdict ()
235
235
issue_num = int (issue_dict ['id' ].lstrip ('0' ))
236
- found_ids .append (issue_num )
236
+ found_ids .add (issue_num )
237
237
238
238
#End script if no keyword/id pairs were found:
239
239
if not found_ids :
240
240
endmsg = f"Pull request #{ pr_num } was merged without using any of the keywords. "
241
241
endmsg += "Thus there are no issues to close."
242
242
end_script (endmsg )
243
243
244
- close_pulls = found_ids and open_pulls
245
- close_issues = found_ids and open_issues
244
+ close_pulls = list ( found_ids . intersection ( open_pulls ))
245
+ close_issues = list ( found_ids . intersection ( open_issues ))
246
246
247
247
248
248
#+++END REFERENCED PR LOOP+++
You can’t perform that action at this time.
0 commit comments