git

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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