fix(cmd/joj3): log commitMsg
All checks were successful
submodules sync / sync (push) Successful in 42s
build / build (push) Successful in 1m20s
build / trigger-build-image (push) Successful in 7s

This commit is contained in:
张泊明518370910136 2024-11-21 03:38:37 -05:00
parent fa5f4216dc
commit b7a579ffed
GPG Key ID: D47306D7062CDA9D

View File

@ -34,7 +34,7 @@ func mainImpl() (err error) {
var stageResults []internalStage.StageResult
var forceQuitStageName string
var teapotResult teapot.TeapotResult
var msg string
var commitMsg string
defer func() {
totalScore := 0
for _, stageResult := range stageResults {
@ -55,7 +55,7 @@ func mainImpl() (err error) {
"issue", teapotResult.Issue,
"action", teapotResult.Action,
"sha", teapotResult.Sha,
"msg", msg,
"commitMsg", commitMsg,
"error", err,
)
}()
@ -72,13 +72,13 @@ func mainImpl() (err error) {
fallbackConfFileName = confFileName
}
slog.Info("start joj3", "version", Version)
msg, err = conf.GetCommitMsg()
commitMsg, err = conf.GetCommitMsg()
if err != nil {
slog.Error("get commit msg", "error", err)
return err
}
confPath, confStat, conventionalCommit, err := conf.GetConfPath(
confFileRoot, confFileName, fallbackConfFileName, msg, tag)
confFileRoot, confFileName, fallbackConfFileName, commitMsg, tag)
if err != nil {
slog.Error("get conf path", "error", err)
return err