Documentation
¶
Index ¶
- func FormatExclusionReport(excludedBranches []string, patterns []string) string
- type AbandonedBranchReport
- type BranchFilter
- type BranchInfo
- type Syncer
- func (s *Syncer) EnsureRepositoryCloned(repoName string) error
- func (s *Syncer) GenerateAbandonedBranchSummary() string
- func (s *Syncer) GenerateDeleteCommands(report *AbandonedBranchReport, repoName string) string
- func (s *Syncer) GenerateDeleteScript() (string, error)
- func (s *Syncer) SetBackupEnabled(enabled bool)
- func (s *Syncer) SyncRepository(repoName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatExclusionReport ¶
FormatExclusionReport formats a report of excluded branches
Types ¶
type AbandonedBranchReport ¶
type AbandonedBranchReport struct { MainBranchUpdated bool MainBranchLastCommit time.Time AbandonedBranches []BranchInfo AbandonedIgnoredBranches []BranchInfo // Abandoned branches that match exclusion patterns TotalBranches int TotalIgnoredBranches int }
AbandonedBranchReport holds the analysis results
type BranchFilter ¶
type BranchFilter struct {
// contains filtered or unexported fields
}
BranchFilter handles branch filtering based on exclusion patterns
func NewBranchFilter ¶
func NewBranchFilter(excludePatterns []string) (*BranchFilter, error)
NewBranchFilter creates a new branch filter from exclusion patterns
func (*BranchFilter) FilterBranches ¶
func (f *BranchFilter) FilterBranches(branches []string) []string
FilterBranches filters a list of branches, removing excluded ones
func (*BranchFilter) GetExcludedBranches ¶
func (f *BranchFilter) GetExcludedBranches(branches []string) []string
GetExcludedBranches returns a list of branches that were excluded
func (*BranchFilter) ShouldExclude ¶
func (f *BranchFilter) ShouldExclude(branchName string) bool
ShouldExclude checks if a branch should be excluded based on the patterns
type BranchInfo ¶
type BranchInfo struct { Name string LastCommit time.Time Remote string IsAbandoned bool AbandonReason string RemotesWithBranch []string // List of remotes that have this branch }
BranchInfo holds information about a branch
type Syncer ¶
type Syncer struct {
// contains filtered or unexported fields
}
Syncer handles repository synchronization between organizations
func New ¶
CLAUDE: Is there a reason, we return a pointer to Syncer? New creates a new Syncer instance
func (*Syncer) EnsureRepositoryCloned ¶ added in v0.4.0
EnsureRepositoryCloned ensures a repository is cloned locally without syncing This is used for showcase-only mode
func (*Syncer) GenerateAbandonedBranchSummary ¶
GenerateAbandonedBranchSummary generates a summary of all abandoned branches across repos
func (*Syncer) GenerateDeleteCommands ¶ added in v0.6.2
func (s *Syncer) GenerateDeleteCommands(report *AbandonedBranchReport, repoName string) string
GenerateDeleteCommands generates shell commands to delete abandoned branches
func (*Syncer) GenerateDeleteScript ¶ added in v0.6.2
GenerateDeleteScript generates a shell script file to delete all abandoned branches
func (*Syncer) SetBackupEnabled ¶
SetBackupEnabled enables or disables syncing to backup locations
func (*Syncer) SyncRepository ¶
SyncRepository synchronizes a repository across all configured organizations