Github user dbtsai commented on a diff in the pull request:
https://github.com/apache/spark/pull/21991#discussion_r207781137
--- Diff: dev/merge_spark_pr.py ---
@@ -154,20 +154,22 @@ def merge_pr(pr_num, target_ref, title, body,
pr_repo_desc):
# to people every time someone creates a public fork of Spark.
merge_message_flags += ["-m", body.replace("@", "")]
- authors = "\n".join(["Author: %s" % a for a in distinct_authors])
-
- merge_message_flags += ["-m", authors]
+ committer_name = run_cmd("git config --get user.name").strip()
+ committer_email = run_cmd("git config --get user.email").strip()
if had_conflicts:
- committer_name = run_cmd("git config --get user.name").strip()
- committer_email = run_cmd("git config --get user.email").strip()
message = "This patch had conflicts when merged, resolved
by\nCommitter: %s <%s>" % (
committer_name, committer_email)
merge_message_flags += ["-m", message]
# The string "Closes #%s" string is required for GitHub to correctly
close the PR
merge_message_flags += ["-m", "Closes #%s from %s." % (pr_num,
pr_repo_desc)]
+ authors = "\n".join(["Co-authored-by: %s" % a for a in
distinct_authors])
--- End diff --
Seems that those keys are widely used in [ Linux
community](https://git.wiki.kernel.org/index.php/CommitMessageConventions) for
a long time, and Github adopted `Co-authored-by` to include the work of
cu-authoers in the profile contributions graph and the repository's statistics.
This has to be in the end of the message, and Github will just ignore those
keys that are not recognized.
If we want to keep both multiple lines of `Author:` and `Co-authored-by:`,
the information will be duplicated twice. I would like to purpose to just keep
`Co-authored-by:`. For single developer commit, we can just use `Authored-by:`
for consistency.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]