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

Function reviewModeString

internal/agent/util.go:92–100  ·  view source on GitHub ↗
(from, to, commit string)

Source from the content-addressed store, hash-verified

90}
91
92func reviewModeString(from, to, commit string) string {
93 if commit != "" {
94 return session.ReviewModeCommit
95 }
96 if from != "" && to != "" {
97 return session.ReviewModeRange
98 }
99 return session.ReviewModeWorkspace
100}
101
102// detectGitBranch returns the current git branch name for the given repo, or empty string on failure.
103func detectGitBranch(ctx context.Context, repoDir string) string {

Callers 4

TestReviewModeStringFunction · 0.85
NewFunction · 0.85
reviewModeMethod · 0.85
manifestModeMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestReviewModeStringFunction · 0.68