Documentation ¶
Index ¶
- Constants
- func Clone(ctx context.Context, repoUrl, dest string, rev *revision.Revision) error
- type ApplyExternalChangeFunc
- type Checkout
- func (c *Checkout) CreateNewRoll(ctx context.Context, from, to *revision.Revision, rolling []*revision.Revision, ...) (int64, error)
- func (c *Checkout) Download(ctx context.Context, rev *revision.Revision, dest string) error
- func (c *Checkout) GetRevision(ctx context.Context, id string) (*revision.Revision, error)
- func (c *Checkout) LogRevisions(ctx context.Context, from, to *revision.Revision) ([]*revision.Revision, error)
- func (c *Checkout) Update(ctx context.Context) (*revision.Revision, string, error)
- type CreateRollFunc
- type UploadRollFunc
Constants ¶
const (
// RollBranch is the git branch which is used to create rolls.
RollBranch = "roll_branch"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ApplyExternalChangeFunc ¶
ApplyExternalChangeFunc applies the specified ExternalChangeId in whichever way makes sense for the implementation. Example: git_checkout_github uses the ExternalChangeId as a Github PR and cherry-picks the PR patch locally.
type Checkout ¶
type Checkout struct { git.Checkout Branch *config_vars.Template Dependencies []*config.VersionFileConfig RepoURL string RevLinkTmpl string // contains filtered or unexported fields }
Checkout provides common functionality for git checkouts.
func NewCheckout ¶
func NewCheckout(ctx context.Context, c *config.GitCheckoutConfig, reg *config_vars.Registry, workdir, userName, userEmail string, co git.Checkout) (*Checkout, error)
NewCheckout returns a Checkout instance.
func (*Checkout) CreateNewRoll ¶
func (c *Checkout) CreateNewRoll(ctx context.Context, from, to *revision.Revision, rolling []*revision.Revision, emails []string, dryRun bool, commitMsg string, createRoll CreateRollFunc, uploadRoll UploadRollFunc) (int64, error)
CreateNewRoll uploads a new roll using the given createRoll and uploadRoll functions. See documentation for the Parent interface for more details.
func (*Checkout) GetRevision ¶
GetRevision implements Child.
type CreateRollFunc ¶
type CreateRollFunc func(context.Context, git.Checkout, *revision.Revision, *revision.Revision, []*revision.Revision, string) (string, error)
CreateRollFunc generates commit(s) in the local Git checkout to be used in the next roll and returns the hash of the commit to be uploaded. GitCheckoutParent handles creation of the roll branch.