Documentation
¶
Index ¶
- type GitService
- func (s *GitService) AddFileToStaging(ctx context.Context, file string) error
- func (s *GitService) CreateCommit(ctx context.Context, message string) error
- func (s *GitService) CreateTag(ctx context.Context, version, message string) error
- func (s *GitService) FetchTags(ctx context.Context) error
- func (s *GitService) GetChangedFiles(ctx context.Context) ([]string, error)
- func (s *GitService) GetChangedFilesWithStatus(ctx context.Context) ([]models.GitChange, error)
- func (s *GitService) GetCommitCount(ctx context.Context) (int, error)
- func (s *GitService) GetCommitsBetweenTags(ctx context.Context, fromTag, toTag string) ([]models.Commit, error)
- func (s *GitService) GetCommitsSinceTag(ctx context.Context, tag string) ([]models.Commit, error)
- func (s *GitService) GetCurrentBranch(ctx context.Context) (string, error)
- func (s *GitService) GetDiff(ctx context.Context) (string, error)
- func (s *GitService) GetDiffForFiles(ctx context.Context, files []string) (string, error)
- func (s *GitService) GetGitUserEmail(ctx context.Context) (string, error)
- func (s *GitService) GetGitUserName(ctx context.Context) (string, error)
- func (s *GitService) GetLastTag(ctx context.Context) (string, error)
- func (s *GitService) GetRecentCommitMessages(ctx context.Context, count int) ([]string, error)
- func (s *GitService) GetRepoInfo(ctx context.Context) (string, string, string, error)
- func (s *GitService) GetRepoRoot(ctx context.Context) (string, error)
- func (s *GitService) GetTagDate(ctx context.Context, tag string) (string, error)
- func (s *GitService) HasStagedChanges(ctx context.Context) bool
- func (s *GitService) Push(ctx context.Context) error
- func (s *GitService) PushTag(ctx context.Context, version string) error
- func (s *GitService) SetFallback(name, email string)
- func (s *GitService) ValidateGitConfig(ctx context.Context) error
- func (s *GitService) ValidateTagExists(ctx context.Context, tag string) error
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
}
func NewGitService ¶
func NewGitService() *GitService
func (*GitService) AddFileToStaging ¶
func (s *GitService) AddFileToStaging(ctx context.Context, file string) error
func (*GitService) CreateCommit ¶
func (s *GitService) CreateCommit(ctx context.Context, message string) error
func (*GitService) CreateTag ¶
func (s *GitService) CreateTag(ctx context.Context, version, message string) error
func (*GitService) GetChangedFiles ¶
func (s *GitService) GetChangedFiles(ctx context.Context) ([]string, error)
func (*GitService) GetChangedFilesWithStatus ¶ added in v1.8.0
GetChangedFilesWithStatus returns each changed file along with whether it was added, modified, deleted, or renamed, so callers (AI prompts in particular) don't have to infer the operation from the raw diff text.
func (*GitService) GetCommitCount ¶
func (s *GitService) GetCommitCount(ctx context.Context) (int, error)
func (*GitService) GetCommitsBetweenTags ¶
func (*GitService) GetCommitsSinceTag ¶
func (*GitService) GetCurrentBranch ¶
func (s *GitService) GetCurrentBranch(ctx context.Context) (string, error)
func (*GitService) GetDiffForFiles ¶ added in v1.8.0
func (*GitService) GetGitUserEmail ¶
func (s *GitService) GetGitUserEmail(ctx context.Context) (string, error)
GetGitUserEmail returns the configured git user.email
func (*GitService) GetGitUserName ¶
func (s *GitService) GetGitUserName(ctx context.Context) (string, error)
GetGitUserName returns the configured git user.name
func (*GitService) GetLastTag ¶
func (s *GitService) GetLastTag(ctx context.Context) (string, error)
func (*GitService) GetRecentCommitMessages ¶
func (*GitService) GetRepoInfo ¶
func (*GitService) GetRepoRoot ¶ added in v1.8.0
func (s *GitService) GetRepoRoot(ctx context.Context) (string, error)
GetRepoRoot gets the absolute path to the root of the git repository
func (*GitService) GetTagDate ¶
GetTagDate returns the creation date of a tag in YYYY-MM-DD format
func (*GitService) HasStagedChanges ¶
func (s *GitService) HasStagedChanges(ctx context.Context) bool
HasStagedChanges checks if there are changes in the staging area
func (*GitService) Push ¶
func (s *GitService) Push(ctx context.Context) error
Push pushes commits to the remote repository
func (*GitService) PushTag ¶
func (s *GitService) PushTag(ctx context.Context, version string) error
func (*GitService) SetFallback ¶ added in v1.6.0
func (s *GitService) SetFallback(name, email string)
func (*GitService) ValidateGitConfig ¶
func (s *GitService) ValidateGitConfig(ctx context.Context) error
ValidateGitConfig checks if git user.name and user.email are configured
func (*GitService) ValidateTagExists ¶
func (s *GitService) ValidateTagExists(ctx context.Context, tag string) error