Documentation
¶
Index ¶
- type ProgressCallback
- type Repository
- func (r *Repository) Cleanup(owner, name string) error
- func (r *Repository) CleanupAll() error
- func (r *Repository) EnsureCloned(ctx context.Context, owner, name, token string) error
- func (r *Repository) FetchCommits(ctx context.Context, owner, name string, since, until *time.Time) ([]models.Commit, error)
- func (r *Repository) GetAuthorMappings(ctx context.Context, owner, name string) (map[string]string, error)
- func (r *Repository) SetProgressCallback(cb ProgressCallback)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProgressCallback ¶
type ProgressCallback func(message string)
ProgressCallback is called to report progress during git operations
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository manages local git repository operations using go-git
func NewRepository ¶
func NewRepository(baseDir string) (*Repository, error)
NewRepository creates a new repository manager
func (*Repository) Cleanup ¶
func (r *Repository) Cleanup(owner, name string) error
Cleanup removes the local clone of a repository
func (*Repository) CleanupAll ¶
func (r *Repository) CleanupAll() error
CleanupAll removes all local clones
func (*Repository) EnsureCloned ¶
func (r *Repository) EnsureCloned(ctx context.Context, owner, name, token string) error
EnsureCloned ensures a repository is cloned and up to date
func (*Repository) FetchCommits ¶
func (r *Repository) FetchCommits(ctx context.Context, owner, name string, since, until *time.Time) ([]models.Commit, error)
FetchCommits retrieves commits from the local repository using go-git
func (*Repository) GetAuthorMappings ¶
func (r *Repository) GetAuthorMappings(ctx context.Context, owner, name string) (map[string]string, error)
GetAuthorMappings fetches author login mappings This helps map commit authors to GitHub usernames
func (*Repository) SetProgressCallback ¶
func (r *Repository) SetProgressCallback(cb ProgressCallback)
SetProgressCallback sets the callback function for progress reporting
Click to show internal directories.
Click to hide internal directories.