Documentation
¶
Index ¶
- type GitAnalysis
- func (g *GitAnalysis) AnalyzeFunctionCallRelations(dbPath string, result *dos.MrAnalysisResult) error
- func (g *GitAnalysis) CallDbPath(name string, commit string) string
- func (g *GitAnalysis) ClonePath(name string) string
- func (g *GitAnalysis) CloneRepository(project *gitapi.Project, branchName string) (*git.Repository, error)
- func (g *GitAnalysis) MRAnalyzer(projectID, mrID int, autoNotes bool) (*dos.MrAnalysisResult, error)
- func (g *GitAnalysis) RepoCallGraph(project *gitapi.Project, rootDir string) (string, error)
- type LLMAnalyzer
- type MRAnalyzer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitAnalysis ¶
type GitAnalysis struct {
// contains filtered or unexported fields
}
func NewGitAnalysis ¶
func NewGitAnalysis(conf *conf.Biz, data *data.Data) *GitAnalysis
func (*GitAnalysis) AnalyzeFunctionCallRelations ¶
func (g *GitAnalysis) AnalyzeFunctionCallRelations(dbPath string, result *dos.MrAnalysisResult) error
AnalyzeFunctionCallRelations 分析函数调用关系,为MR分析结果中的有效改动函数查找上级调用者
func (*GitAnalysis) CallDbPath ¶
func (g *GitAnalysis) CallDbPath(name string, commit string) string
func (*GitAnalysis) ClonePath ¶
func (g *GitAnalysis) ClonePath(name string) string
func (*GitAnalysis) CloneRepository ¶
func (g *GitAnalysis) CloneRepository(project *gitapi.Project, branchName string) (*git.Repository, error)
CloneRepository 使用go-git库克隆或更新仓库到本地目录并切换到指定分支
func (*GitAnalysis) MRAnalyzer ¶
func (g *GitAnalysis) MRAnalyzer(projectID, mrID int, autoNotes bool) (*dos.MrAnalysisResult, error)
func (*GitAnalysis) RepoCallGraph ¶
RepoCallGraph 对仓库进行静态分析 project 项目信息P rootDir 程序启动目录, 为空时使用克隆路径
type LLMAnalyzer ¶
type LLMAnalyzer struct {
// contains filtered or unexported fields
}
func NewLLMAnalyzer ¶
func NewLLMAnalyzer(apiToken string, apiURL string, model string) (*LLMAnalyzer, error)
func (*LLMAnalyzer) AnalyzeFile ¶
func (a *LLMAnalyzer) AnalyzeFile(ctx context.Context, fileContent string) (dos.LLMResponseList, error)
type MRAnalyzer ¶
MRAnalyzer GitLab MR分析器
func NewMRAnalyzer ¶
NewMRAnalyzer 创建新的MR分析器
func (*MRAnalyzer) AnalyzeMR ¶
func (a *MRAnalyzer) AnalyzeMR(projectID, mrID int, autoNotes bool) (*dos.MrAnalysisResult, error)
AnalyzeMR 分析指定的MR
func (*MRAnalyzer) CreateMRNotes ¶
func (a *MRAnalyzer) CreateMRNotes(projectID int, mrID int, result *dos.MrAnalysisResult) error
CreateMRNotes 创建MR的notes
func (*MRAnalyzer) GetMergeRequest ¶
func (a *MRAnalyzer) GetMergeRequest(projectID, mrID int) (*gitlab.MergeRequest, error)
Click to show internal directories.
Click to hide internal directories.