Documentation
¶
Overview ¶
Package sync implements the repo sync command.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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, map[string]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
Yes 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
Click to show internal directories.
Click to hide internal directories.