sync

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package sync implements the repo sync command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdSync

func NewCmdSync(f *cmdutil.Factory, runF func(*SyncOptions) error) *cobra.Command

NewCmdSync creates the repo sync command.

Types

type SyncOptions

type SyncOptions struct {
	IO         *iostreams.IOStreams
	HttpClient func() (*http.Client, error)
	RootDir    func() (string, error)
	Branch     func() (string, error)
	BaseRepo   func() (string, error)
	GetRepo    func(*api.Client, string, string) (*api.Repository, error)
	CreatePR   func(*api.Client, string, string, *api.CreatePROptions) (*api.PullRequest, error)
	GitRun     func(string, ...string) (string, error)
	MkdirTemp  func(string, string) (string, error)
	RemoveAll  func(string) error

	TargetRepo string
	SourceDir  string
	TargetDir  string
	Title      string
	Body       string
	Base       string
	BranchName string
	CommitMsg  string
	Draft      bool
	JSON       bool
}

type SyncResult

type SyncResult struct {
	SourceRepo    string `json:"source_repo"`
	SourceDir     string `json:"source_dir"`
	TargetRepo    string `json:"target_repo"`
	TargetDir     string `json:"target_dir"`
	BaseBranch    string `json:"base_branch"`
	SyncBranch    string `json:"sync_branch"`
	Changed       bool   `json:"changed"`
	CommitMessage string `json:"commit_message,omitempty"`
	PRNumber      int    `json:"pr_number,omitempty"`
	PRURL         string `json:"pr_url,omitempty"`
}

Source Files

  • sync.go

Jump to

Keyboard shortcuts

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