Documentation
¶
Overview ¶
Package status provides repository status monitoring types and services.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountIssues ¶
func CountIssues(statuses []RepoStatus) int
CountIssues counts how many repos have uncommitted/unpushed changes.
Types ¶
type RepoStatus ¶
type RepoStatus struct {
Name string
Path string
Branch string
HasUncommitted bool
UncommittedCount int
UnpushedCount int
AheadCount int
BehindCount int
HasUpstream bool
LastFetch time.Time
LastCommitTime string
LastCommitAuthor string
Error error
}
RepoStatus contains the status of a single repository.
func GetRepoStatus ¶
func GetRepoStatus(repoPath, name string) RepoStatus
GetRepoStatus gathers all status info for a single repository.
func GetWorkspaceStatus ¶
func GetWorkspaceStatus(workspacePath string, projects []string) []RepoStatus
GetWorkspaceStatus fetches status for all repos in a workspace.
func (RepoStatus) Summary ¶
func (s RepoStatus) Summary() StatusSummary
Summary returns the overall status summary for a repository.
type StatusSummary ¶
type StatusSummary int
StatusSummary represents the overall status of a repo.
const ( StatusClean StatusSummary = iota StatusModified StatusAhead StatusBehind StatusDiverged StatusError StatusLoading )
Click to show internal directories.
Click to hide internal directories.