sync

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatExclusionReport

func FormatExclusionReport(excludedBranches []string, patterns []string) string

FormatExclusionReport formats a report of excluded branches

Types

type AbandonedBranchReport

type AbandonedBranchReport struct {
	MainBranchUpdated    bool
	MainBranchLastCommit time.Time
	AbandonedBranches    []BranchInfo
	TotalBranches        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
}

BranchInfo holds information about a branch

type Syncer

type Syncer struct {
	// contains filtered or unexported fields
}

Syncer handles repository synchronization between organizations

func New

func New(cfg *config.Config, workDir string) *Syncer

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

func (s *Syncer) EnsureRepositoryCloned(repoName string) error

EnsureRepositoryCloned ensures a repository is cloned locally without syncing This is used for showcase-only mode

func (*Syncer) GenerateAbandonedBranchSummary

func (s *Syncer) GenerateAbandonedBranchSummary() string

GenerateAbandonedBranchSummary generates a summary of all abandoned branches across repos

func (*Syncer) SetBackupEnabled

func (s *Syncer) SetBackupEnabled(enabled bool)

SetBackupEnabled enables or disables syncing to backup locations

func (*Syncer) SyncRepository

func (s *Syncer) SyncRepository(repoName string) error

SyncRepository synchronizes a repository across all configured organizations

Jump to

Keyboard shortcuts

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