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

yao pushed a commit to branch branch-3.3
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.3 by this push:
     new 0ef14199fd3 Revert "[SPARK-44813][INFRA] The Jira Python misses our 
assignee when it searches users again"
0ef14199fd3 is described below

commit 0ef14199fd32df09fe183746ee9e69a92f7d1944
Author: Kent Yao <y...@apache.org>
AuthorDate: Sat Aug 19 01:57:03 2023 +0800

    Revert "[SPARK-44813][INFRA] The Jira Python misses our assignee when it 
searches users again"
    
    This reverts commit 7e7c41bf1007ca05ffc3d818d34d75570d234a6d.
---
 dev/merge_spark_pr.py | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/dev/merge_spark_pr.py b/dev/merge_spark_pr.py
index 8555abe9bd0..e21a39a6881 100755
--- a/dev/merge_spark_pr.py
+++ b/dev/merge_spark_pr.py
@@ -372,7 +372,7 @@ def choose_jira_assignee(issue, asf_jira):
                 except BaseException:
                     # assume it's a user id, and try to assign (might fail, we 
just prompt again)
                     assignee = asf_jira.user(raw_assignee)
-                assign_issue(issue.key, assignee.name)
+                asf_jira.assign_issue(issue.key, assignee.name)
                 return assignee
         except KeyboardInterrupt:
             raise
@@ -381,19 +381,6 @@ def choose_jira_assignee(issue, asf_jira):
             print("Error assigning JIRA, try again (or leave blank and fix 
manually)")
 
 
-def assign_issue(client: jira.client.JIRA, issue: int, assignee: str) -> bool:
-    """
-    Assign an issue to a user, which is a shorthand for 
jira.client.JIRA.assign_issue.
-    The original one has an issue that it will search users again and only 
choose the assignee
-    from 20 candidates. If it's unmatched, it picks the head blindly. In our 
case, the assignee
-    is already resolved.
-    """
-    url = getattr(client, "_get_latest_url")(f"issue/{issue}/assignee")
-    payload = {"name": assignee}
-    getattr(client, "_session").put(url, data=json.dumps(payload))
-    return True
-
-
 def resolve_jira_issues(title, merge_branches, comment):
     jira_ids = re.findall("SPARK-[0-9]{4,5}", title)
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to