autophagy commented on a change in pull request #7:
URL: https://github.com/apache/flink-jira-bot/pull/7#discussion_r618157495



##########
File path: README.md
##########
@@ -40,7 +40,12 @@ The configuration of the rules can be found in 
[config.yaml](config.yaml).
 
 ## About the Rules
 
-### Rule 1 (not implemented yet)
+### Rule 1 Major+ Need Assignee or Discussion
+
+Tickets major and above need an assignee, or an update within 
{stale_<blocker|critical|major>.stale_days}, otherwise the priority will be 
reduced after a warning period of {stale_<blocker|critical|major>.warning_days} 
days.
+An update of on of the Sub-Tasks counts as an update to the ticket. 

Review comment:
       ```suggestion
   An update on the Sub-Tasks counts as an update to the ticket. 
   ```

##########
File path: flink_jira_bot.py
##########
@@ -302,7 +62,21 @@ def get_args():
         password=os.environ["JIRA_PASSWORD"],
     )
 
-    rule_2 = Rule2(jira, jira_bot_config, args.dryrun)
-    rule_3 = Rule3(jira, jira_bot_config, args.dryrun)
-    rule_2.run()
-    rule_3.run()
+    stale_assigned_rule = StaleAssignedRule(
+        jira, jira_bot_config["stale_assigned"], args.dryrun
+    )
+    stale_minor_rule = StaleMinorRule(jira, jira_bot_config["stale_minor"], 
args.dryrun)
+    stale_major_rule = StaleMajorOrAboveRule(
+        jira, jira_bot_config["stale_major"], args.dryrun, "Major"
+    )

Review comment:
       Since you pass in which priority you want the rule to be concerned with 
here, maybe it'd also make sense to provide to the lower priority too? Rather 
than hardcoding it here: 
https://github.com/apache/flink-jira-bot/pull/7/files#diff-dd96adaad173bcbf18f8117fa42d2cbb2bf6d5f9aca9c8ab962bb2ae31df590cR38
   
   So something like 
   ```suggestion
       stale_major_rule = StaleMajorOrAboveRule(
           jira, jira_bot_config["stale_major"], args.dryrun, priority="Major", 
lower_priority="Minor"
       )
   ```
   
   I think either that, or hardcoding as a constant the list of priorities the 
StaleMajorOrAbove rule should be concerned with, like:
   ```
   PRIORITIES = ["Major", "Critical", "Blocker"]
   ```
   and just iterating over that list. I think providing one priority as a param 
to the rule, but having another aspect be hardcoded as a constant in the rule, 
could potentially be a little confusing.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to