Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommitHistory ¶ added in v1.5.0
type DailyStats ¶ added in v1.5.0
type DateCache ¶ added in v1.6.1
type DateCache struct {
// contains filtered or unexported fields
}
Add at the top of the file
func NewDateCache ¶ added in v1.6.1
func NewDateCache() *DateCache
func (*DateCache) GetParsedDate ¶ added in v1.6.1
type DateRange ¶ added in v1.6.0
DateRange represents a time period with start (inclusive) and end (exclusive) dates
func GetCurrentWeekRange ¶ added in v1.6.0
func GetCurrentWeekRange() DateRange
GetCurrentWeekRange returns the date range for the current week (Monday to Sunday)
func GetMonthRange ¶ added in v1.6.0
GetMonthRange returns the date range for the specified number of months back
func GetPreviousWeekRange ¶ added in v1.6.0
func GetPreviousWeekRange() DateRange
GetPreviousWeekRange returns the date range for the previous week (Monday to Sunday)
type RepoMetadata ¶
type RepoMetadata struct { Path string `json:"path"` LastCommit time.Time `json:"last_commit"` CommitCount int `json:"commit_count"` CurrentStreak int `json:"current_streak"` LongestStreak int `json:"longest_streak"` WeeklyCommits int `json:"weekly_commits"` LastWeeksCommits int `json:"last_weeks_commits"` MonthlyCommits int `json:"monthly_commits"` MostActiveDay string `json:"most_active_day"` LastActivity string `json:"last_activity"` AuthorVerified bool `json:"author_verified"` Dormant bool `json:"dormant"` CommitHistory []CommitHistory `json:"commit_history"` DailyStats map[string]DailyStats `json:"daily_stats"` LastAnalyzed time.Time `json:"last_analyzed"` TotalLines int `json:"total_lines"` TotalFiles int `json:"total_files"` Languages map[string]int `json:"languages"` Contributors map[string]int `json:"contributors"` }
func FetchRepoMetadata ¶ added in v1.6.3
func FetchRepoMetadata(repoPath string) RepoMetadata
FetchRepoMetadata - gets metadata for a single repository
func ScanDirectories ¶
func ScanDirectories(dirs []string, author string, shouldExclude func(string) bool) ([]RepoMetadata, error)
ScanDirectories - scans for Git repositories in the specified directories
func (*RepoMetadata) CalculatePeakHours ¶ added in v1.5.0
func (m *RepoMetadata) CalculatePeakHours() []TimeSlot
func (*RepoMetadata) CalculateVelocity ¶ added in v1.5.0
func (m *RepoMetadata) CalculateVelocity() VelocityMetrics
func (*RepoMetadata) GetCommitTrend ¶ added in v1.5.0
func (m *RepoMetadata) GetCommitTrend(days int) map[string]int
func (*RepoMetadata) GetLanguageDistribution ¶ added in v1.5.0
func (m *RepoMetadata) GetLanguageDistribution() map[string]float64
func (*RepoMetadata) ValidateData ¶ added in v1.6.1
func (m *RepoMetadata) ValidateData() ValidationResult
type StreakInfo ¶ added in v1.3.0
Add this new function to track both current and longest streaks
type TimeSlot ¶ added in v1.5.0
type TimeSlot struct { Hour int `json:"hour"` Commits int `json:"commits"` Lines int `json:"lines"` }
TimeSlot represents a 24-hour time period divided into slots
type ValidationResult ¶ added in v1.6.1
ValidationResult holds the results of data validation
type VelocityMetrics ¶ added in v1.5.0
type VelocityMetrics struct { DailyAverage float64 `json:"daily_average"` WeeklyTrend float64 `json:"weekly_trend"` // Percentage change from previous week MonthlyTrend float64 `json:"monthly_trend"` // Percentage change from previous month PeakHours []TimeSlot `json:"peak_hours"` }
VelocityMetrics represents coding velocity over different time periods