model

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirtyFile

type DirtyFile struct {
	Path     string
	Staged   bool
	Unstaged bool
}

DirtyFile represents a single changed file in a dirty repo.

type LocalClassification

type LocalClassification int

LocalClassification represents the classification of a local directory entry.

const (
	ClassManaged            LocalClassification = iota // Matches an included repo
	ClassUnknown                                       // No matching repo (included or excluded)
	ClassExcludedButPresent                            // Matches an excluded repo name/pattern
	ClassCollision                                     // Path exists but is not a valid clone
)

func (LocalClassification) String

func (c LocalClassification) String() string

String returns a human-readable name for the classification.

type LocalEntry

type LocalEntry struct {
	Name           string
	Classification LocalClassification
	Detail         string // additional info (e.g., collision reason)
}

LocalEntry represents a classified local directory entry.

type RepoAction

type RepoAction int

RepoAction represents the action taken or finding for a repository.

const (
	ActionNone           RepoAction = iota
	ActionCloned                    // Repository was cloned
	ActionUpdated                   // Repository was pulled with new changes
	ActionAlreadyCurrent            // Repository was already up to date
	ActionDirty                     // Repository has uncommitted changes
	ActionBranchDrift               // Repository was on wrong branch (checkout performed)
	ActionCloneError                // Clone failed
	ActionFetchError                // Fetch failed
	ActionCheckoutError             // Checkout failed
	ActionPullError                 // Pull failed
	ActionSubmoduleError            // Submodule update failed
)

func (RepoAction) String

func (a RepoAction) String() string

String returns a human-readable name for the action.

type RepoInfo

type RepoInfo struct {
	Name          string
	CloneURL      string
	DefaultBranch string
	IsPrivate     bool
	IsArchived    bool
}

RepoInfo represents a GitHub repository from the org inventory.

type RepoResult

type RepoResult struct {
	Name          string
	Action        RepoAction
	CurrentBranch string
	DefaultBranch string
	Error         error
	DirtyFiles    []DirtyFile
	Additions     int
	Deletions     int
	BranchDrift   bool // true if current != default branch at start
	Updated       bool // true if pull brought new changes
}

RepoResult holds the outcome of processing a single repository.

type Summary

type Summary struct {
	TotalRepos         int
	Cloned             int
	Updated            int
	Dirty              int
	BranchDrift        int
	UnknownFolders     int
	ExcludedButPresent int
	Errors             int
}

Summary holds aggregate counts for the final report.

Jump to

Keyboard shortcuts

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