git

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: MIT Imports: 11 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) 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) 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) 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