Skip to content

Commit badf703

Browse files
committed
Import label-bot in rule-handler
1 parent 32160e9 commit badf703

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

rule_generator.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,11 @@ def rule_generator(issue, user_profile, bot_conf):
137137
# Step 4: Finish the complete rule list
138138
rule_list = []
139139
if not isinstance(info_rules, list) or not isinstance(label_bot_rules, list):
140-
# info_rules = list(info_rules)
140+
info_rules = list(info_rules)
141141
label_bot_rules = list(label_bot_rules)
142-
# rule_list = rule_list + info_rules
143142
rule_list = rule_list + info_rules + label_bot_rules
144-
# return rule_list
145-
return list(filter(lambda x: rule_list.count(x) == 1, rule_list)) # Currently rule-handler and label-bot generate some same rules when creating an issue, so de-duplicated them here.
143+
rules = list(filter(lambda x: rule_list.count(x) == 1, rule_list)) # Currently rule-handler and label-bot generate some same rules when creating an issue, so de-duplicated them here.
144+
return rules
146145

147146
def label_handler(labels):
148147
isContainUser = False

0 commit comments

Comments
 (0)