MCPcopy Create free account
hub / github.com/alibaba/open-code-review / getCommitMessage

Function getCommitMessage

cmd/opencodereview/git.go:27–33  ·  view source on GitHub ↗
(repoDir, commit string)

Source from the content-addressed store, hash-verified

25}
26
27func getCommitMessage(repoDir, commit string) (string, error) {
28 out, err := runGitCmd(repoDir, "log", "-1", "--format=%B", "--end-of-options", commit)
29 if err != nil {
30 return "", fmt.Errorf("git log failed: %w", err)
31 }
32 return strings.TrimSpace(string(out)), nil
33}

Callers 5

loadDelegateContextFunction · 0.85
TestGetCommitMessageFunction · 0.85
executeReviewFunction · 0.85

Calls 1

runGitCmdFunction · 0.85

Tested by 3

TestGetCommitMessageFunction · 0.68