git

package
v1.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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) FetchTags

func (s *GitService) FetchTags(ctx context.Context) error

func (*GitService) GetChangedFiles

func (s *GitService) GetChangedFiles(ctx context.Context) ([]string, error)

func (*GitService) GetChangedFilesWithStatus added in v1.8.0

func (s *GitService) GetChangedFilesWithStatus(ctx context.Context) ([]models.GitChange, error)

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 (s *GitService) GetCommitsBetweenTags(ctx context.Context, fromTag, toTag string) ([]models.Commit, error)

func (*GitService) GetCommitsSinceTag

func (s *GitService) GetCommitsSinceTag(ctx context.Context, tag string) ([]models.Commit, error)

func (*GitService) GetCurrentBranch

func (s *GitService) GetCurrentBranch(ctx context.Context) (string, error)

func (*GitService) GetDiff

func (s *GitService) GetDiff(ctx context.Context) (string, error)

func (*GitService) GetDiffForFiles added in v1.8.0

func (s *GitService) GetDiffForFiles(ctx context.Context, files []string) (string, error)

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 (s *GitService) GetRecentCommitMessages(ctx context.Context, count int) ([]string, error)

func (*GitService) GetRepoInfo

func (s *GitService) GetRepoInfo(ctx context.Context) (string, string, string, error)

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

func (s *GitService) GetTagDate(ctx context.Context, tag string) (string, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL