dongjoon-hyun commented on a change in pull request #35205:
URL: https://github.com/apache/spark/pull/35205#discussion_r784500632



##########
File path: dev/merge_spark_pr.py
##########
@@ -135,11 +135,12 @@ def merge_pr(pr_num, target_ref, title, body, 
pr_repo_desc):
         continue_maybe(msg)
         had_conflicts = True
 
+    # First commit author should be considered as the primary author when the 
rank is the same
     commit_authors = run_cmd(
-        ["git", "log", "HEAD..%s" % pr_branch_name, "--pretty=format:%an 
<%ae>"]
+        ["git", "log", "HEAD..%s" % pr_branch_name, "--pretty=format:%an 
<%ae>", "--reverse"]
     ).split("\n")
     distinct_authors = sorted(
-        set(commit_authors), key=lambda x: commit_authors.count(x), 
reverse=True
+        list(dict.fromkeys(commit_authors)), key=lambda x: 
commit_authors.count(x), reverse=True

Review comment:
       Yes, I thought that idea too, but decided to fix the tie only in this 
PR, @gengliangwang .
   > I thought the proposal was to make the author of first commit as the PR 
author.




-- 
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.

To unsubscribe, e-mail: [email protected]

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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to