[PATCH compass-ci] sbin/auto_submit: add commit_title

So it would be easy for user to find the commit. Signed-off-by: Li Yuanchao <lyc163mail@163.com> --- sbin/auto_submit | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sbin/auto_submit b/sbin/auto_submit index 595053e..08193e5 100755 --- a/sbin/auto_submit +++ b/sbin/auto_submit @@ -81,7 +81,9 @@ class AutoSubmit base_commit = %x(git -C #{mirror_dir} merge-base master #{branch}).chomp argvs_for_base.push("upstream_commit=#{base_commit}") system(argvs_for_base.join(' ')) - return "author_email=#{author_email} committer_email=#{committer_email} base_commit=#{base_commit}" + commit_title = %x(git -C #{mirror_dir} log --format=%s -1 #{commit_id}).chomp + + return "author_email=#{author_email} committer_email=#{committer_email} base_commit=#{base_commit} commit_title=#{commit_title}" end def submit_specific_branch(submit_argv, newrefs_info, branches) -- 2.23.0

On Thu, Apr 29, 2021 at 11:58:28AM +0800, Li Yuanchao wrote:
So it would be easy for user to find the commit.
we can get anything by commit_id, why need use commit_titile to find? Thanks, Xueliang
Signed-off-by: Li Yuanchao <lyc163mail@163.com> --- sbin/auto_submit | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sbin/auto_submit b/sbin/auto_submit index 595053e..08193e5 100755 --- a/sbin/auto_submit +++ b/sbin/auto_submit @@ -81,7 +81,9 @@ class AutoSubmit base_commit = %x(git -C #{mirror_dir} merge-base master #{branch}).chomp argvs_for_base.push("upstream_commit=#{base_commit}") system(argvs_for_base.join(' ')) - return "author_email=#{author_email} committer_email=#{committer_email} base_commit=#{base_commit}" + commit_title = %x(git -C #{mirror_dir} log --format=%s -1 #{commit_id}).chomp + + return "author_email=#{author_email} committer_email=#{committer_email} base_commit=#{base_commit} commit_title=#{commit_title}" end
def submit_specific_branch(submit_argv, newrefs_info, branches) -- 2.23.0

On Thu, Apr 29, 2021 at 03:08:04PM +0800, Cao Xueliang wrote:
On Thu, Apr 29, 2021 at 11:58:28AM +0800, Li Yuanchao wrote:
So it would be easy for user to find the commit.
we can get anything by commit_id, why need use commit_titile to find?
That is to be firendly for user. Cause a commit_id is hard for user to remember. We'll both give title and id. Thanks, Yuanchao
participants (2)
-
Cao Xueliang
-
Li Yuanchao