You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by kn...@apache.org on 2021/05/19 08:09:44 UTC

[flink-jira-bot] 22/47: [hotfix] Auto Close issues with resolution "Auto Closed" instead of "Fixed"

This is an automated email from the ASF dual-hosted git repository.

knaufk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-jira-bot.git

commit 5f209aeda78972c547e477751f235efffecbe545
Author: Konstantin Knauf <kn...@gmail.com>
AuthorDate: Wed Apr 21 11:03:49 2021 +0200

    [hotfix] Auto Close issues with resolution "Auto Closed" instead of "Fixed"
---
 flink_jira_bot.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/flink_jira_bot.py b/flink_jira_bot.py
index 00ce80f..8b46132 100644
--- a/flink_jira_bot.py
+++ b/flink_jira_bot.py
@@ -91,7 +91,9 @@ class FlinkJiraRule:
 
     def close_issue(self, key):
         if not self.is_dry_run:
-            self.jira_client.issue_transition(key, "Closed")
+            self.jira_client.set_issue_status(
+                key, "Closed", fields={"resolution": {"name": "Auto Closed"}}
+            )
         else:
             logging.info(f"DRY_RUN (({key})): Closing.")
 
@@ -112,7 +114,7 @@ class Rule3(FlinkJiraRule):
     {stale_minor.warning_days} with a comment that encourages users to watch, comment and simply reopen with a higher
     priority if the problem insists.
     """
-    
+
     def __init__(self, jira_client, config, is_dry_run):
         super().__init__(jira_client, config, is_dry_run)
         self.stale_days = config["stale_minor"]["stale_days"].get()