Skip to content
Permalink
Browse files
[FLINK-23250] dont unassign people automatically
  • Loading branch information
knaufk committed Jul 5, 2021
1 parent a1d140f commit fdb991786ea1fceae56776f190cca6b714a1461a
Showing 3 changed files with 5 additions and 27 deletions.
@@ -49,7 +49,7 @@ The time periods before warning differ based on the priority:

### Rule 2: Unassign Stale Assigned Tickets

Assigned tickets without an update for {stale_assigned.stale_days} are unassigned after a warning period of {stale_assigned.warning_days}. Before this happens the assignee is notified that this is about to happen and asked for an update on the status of her contribution.
Assigned tickets without an update for {stale_assigned.stale_days} days are marked stale. The assignee is notified and asked for an update on the status of her contribution.

### Rule 3: Close Stale Minor Tickets

@@ -25,10 +25,10 @@ stale_assigned:
warning_comment: |
I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help the community manage its development. I see this issue is assigned but has not received an update in {stale_days} days, so it has been labeled "{warning_label}".
If you are still working on the issue, please remove the label and add a comment updating the community on your progress. If this issue is waiting on feedback, please consider this a reminder to the committer/reviewer. Flink is a very active project, and so we appreciate your patience.
If you are no longer working on the issue, please unassign yourself so someone else may work on it. If the "warning_label" label is not removed in {warning_days} days, the issue will be automatically unassigned.
If you are no longer working on the issue, please unassign yourself so someone else may work on it.
done_comment: |
This issue was marked "{warning_label}" {warning_days} days ago and has not received an update. I have automatically removed the current assignee from the issue so others in the community may pick it up. If you are still working on this ticket, please ask a committer to reassign you and provide an update about your current status.
Irrelevant
stale_minor:
ticket_limit: 10
@@ -23,8 +23,7 @@

class StaleAssignedRule(FlinkJiraRule):
"""
Assigned tickets without an update for {stale_assigned.stale_days} are unassigned after a warning period of
{stale_assigned.warning_days}. Before this happens the assignee is notified that this is about to happen and
Assigned tickets without an update for {stale_assigned.stale_days} days are marked stale. The assignee is notified and
asked for an update on the status of her contribution.
"""

@@ -42,25 +41,4 @@ def run(self):
)

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

def unassign(self, key, warning_label, done_label, comment):
if not self.is_dry_run:
if self.jira_client.get_issue_status(key) == "In Progress":
self.jira_client.edit_issue(
key,
{"assignee": [{"set": {"name": self.jira_client.username}}]},
notify_users=False,
)
self.jira_client.set_issue_status(key, "Open")
self.jira_client.edit_issue(
key,
{
"labels": [{"add": done_label}, {"remove": warning_label}],
"comment": [{"add": {"body": comment}}],
"assignee": [{"set": {"name": None}}],
},
notify_users=False,
)
else:
logging.info(f"DRY_RUN (({key})): Unassigning.")
pass

0 comments on commit fdb9917

Please sign in to comment.