Documentation
¶
Index ¶
- func CheckGitRepository(ctx context.Context) bool
- func CommitChanges(ctx context.Context, commitMessage string) error
- func FilterLockFiles(diff string, lockFiles []string) string
- func GetCurrentBranch(ctx context.Context) (string, error)
- func GetGitDiff(ctx context.Context) (string, error)
- func GetHeadCommitMessage(ctx context.Context) (string, error)
- type DiffChunk
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckGitRepository ¶
CheckGitRepository verifies if the current folder is a Git repository using go-git.
func CommitChanges ¶
CommitChanges creates a commit with the provided message using go-git.
func FilterLockFiles ¶
FilterLockFiles removes diff sections of lock files from the analysis.
func GetCurrentBranch ¶
GetCurrentBranch returns the current Git branch name using go-git.
func GetGitDiff ¶
GetGitDiff returns a unified diff of staged changes by comparing the HEAD tree and the working directory. This version skips diffing files that are detected as binary.
Types ¶
type DiffChunk ¶ added in v0.1.0
DiffChunk represents a single "hunk" within a diff for a particular file.
func ParseDiffToChunks ¶ added in v0.1.0
ParseDiffToChunks splits a unified diff into a list of DiffChunk structs.
Click to show internal directories.
Click to hide internal directories.