Documentation
¶
Index ¶
- type GitService
- func (g *GitService) GetCommitHash() (string, error)
- func (g *GitService) GetCurrentUserEmail() string
- func (g *GitService) GetFileBlame(filePath string) (*git.BlameResult, error)
- func (g *GitService) GetOrganization() string
- func (g *GitService) GetRelativePath(absPath string) (string, error)
- func (g *GitService) GetRemoteURL() string
- func (g *GitService) GetRepoName() string
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitService ¶
type GitService struct {
// contains filtered or unexported fields
}
GitService implements Git operations for the stevedore tool
func (*GitService) GetCommitHash ¶
func (g *GitService) GetCommitHash() (string, error)
GetCommitHash returns the current HEAD commit hash
func (*GitService) GetCurrentUserEmail ¶
func (g *GitService) GetCurrentUserEmail() string
GetCurrentUserEmail returns the current git user's email
func (*GitService) GetFileBlame ¶
func (g *GitService) GetFileBlame(filePath string) (*git.BlameResult, error)
GetFileBlame retrieves git blame information for a file
func (*GitService) GetOrganization ¶
func (g *GitService) GetOrganization() string
GetOrganization returns the git organization name
func (*GitService) GetRelativePath ¶
func (g *GitService) GetRelativePath(absPath string) (string, error)
GetRelativePath computes the relative file path from the git root
func (*GitService) GetRemoteURL ¶
func (g *GitService) GetRemoteURL() string
GetRemoteURL returns the git remote URL
func (*GitService) GetRepoName ¶
func (g *GitService) GetRepoName() string
GetRepoName returns the repository name
type Service ¶
type Service interface {
GetCommitHash() (string, error)
GetOrganization() string
GetRepoName() string
GetRelativePath(absPath string) (string, error)
GetRemoteURL() string
GetFileBlame(filePath string) (*git.BlameResult, error)
GetCurrentUserEmail() string
}
Service defines the interface for Git operations
func NewGitService ¶
NewGitService creates a new GitService instance by walking up the directory tree to find the git repository root
Click to show internal directories.
Click to hide internal directories.