未验证 提交 ef956ba6 编写于 作者: M Mislav Marohnić 提交者: GitHub

Merge pull request #2156 from danielcompton/clarify-pull-request-multi-commits

Move commitLogs declaration inside multiple commits block
......@@ -257,7 +257,6 @@ of text is the title and the rest is the description.`, fullBase, fullHead))
}
message := ""
commitLogs := ""
commits, _ := git.RefList(baseTracking, headForMessage)
if len(commits) == 1 {
......@@ -267,13 +266,13 @@ of text is the title and the rest is the description.`, fullBase, fullHead))
re := regexp.MustCompile(`\nSigned-off-by:\s.*$`)
message = re.ReplaceAllString(message, "")
} else if len(commits) > 1 {
commitLogs, err = git.Log(baseTracking, headForMessage)
commitLogs, err := git.Log(baseTracking, headForMessage)
utils.Check(err)
}
if commitLogs != "" {
messageBuilder.AddCommentedSection("\nChanges:\n\n" + strings.TrimSpace(commitLogs))
}
}
workdir, _ := git.WorkdirName()
if workdir != "" {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册