Skip to content
Permalink
Browse files
Merge pull request #19 from knaufk/FLINK-23205
[FLINK-23205] relax time intervals of Jira Bot
  • Loading branch information
knaufk committed Jul 5, 2021
2 parents feec74f + 1f645fd commit bd377c0e28f955988ecb1fa230298c25e03aae9e
Showing 3 changed files with 8 additions and 8 deletions.
@@ -18,7 +18,7 @@

stale_assigned:
ticket_limit: 10
stale_days: 14
stale_days: 30
warning_days: 7
warning_label: "stale-assigned"
done_label: "auto-unassigned"
@@ -56,7 +56,7 @@ stale_blocker:
stale_critical:
ticket_limit: 10
stale_days: 7
stale_days: 14
warning_days: 7
warning_label: "stale-critical"
done_label: "auto-deprioritized-critical"
@@ -68,7 +68,7 @@ stale_critical:
stale_major:
ticket_limit: 15
stale_days: 30
stale_days: 60
warning_days: 7
warning_label: "stale-major"
done_label: "auto-deprioritized-major"
@@ -22,12 +22,12 @@

class StaleMajorOrAboveRule(FlinkJiraRule):
"""
Tickets major and above need an assignee, or an update within {stale_<blocker|critical|major>.stale_days},
Tickets major and above without a fixVersion 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.
Before this happens the assignee/reporter/watchers are notified that the ticket is about to become stale and will
be deprioritized.
The time periods before warning differ based on the priority:
The time periods before warning differ based on the priority.
"""

def __init__(self, jira_client, config, is_dry_run, priority, lower_priority):
@@ -43,7 +43,7 @@ def run(self):
)
self.mark_stale_tickets_stale(
f'project=FLINK AND type != "Sub-Task" AND priority = {self.priority} AND resolution = Unresolved '
f"AND assignee is empty AND updated < startOfDay(-{self.stale_days}d)"
f"AND assignee is empty AND updated < startOfDay(-{self.stale_days}d) AND fixVersion = null"
)

def handle_stale_ticket(self, key, warning_label, done_label, comment):
@@ -23,7 +23,7 @@

class StaleMinorRule(FlinkJiraRule):
"""
An unresolved Minor ticket without an update for {stale_minor.stale_days} is closed after a warning period of
An unresolved Minor ticket without an update for {stale_minor.stale_days} or a fixVersion is closed after a warning period of
{stale_minor.warning_days} with a comment that encourages users to watch, comment and simply reopen with a higher
priority if the problem insists.
"""
@@ -39,7 +39,7 @@ def run(self):
)
self.mark_stale_tickets_stale(
f'project = FLINK AND type != "Sub-Task" AND Priority = Minor AND resolution = Unresolved '
f"AND updated < startOfDay(-{self.stale_days}d)"
f"AND updated < startOfDay(-{self.stale_days}d) AND fixVersion = null"
)

def handle_stale_ticket(self, key, warning_label, done_label, comment):

0 comments on commit bd377c0

Please sign in to comment.