Documentation
¶
Overview ¶
Copyright 2023 The ChromiumOS Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Copyright 2023 The ChromiumOS Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Index ¶
- func CheckCherryPick(ctx context.Context, httpClient *http.Client, tmpRoot string, ...) []error
- func Clone(ctx context.Context, url string, branch string, parentDir string) (string, error)
- func FetchAndCherryPick(ctx context.Context, revision *gerrit.RevisionInfo, url string, repoDir string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCherryPick ¶
func CheckCherryPick( ctx context.Context, httpClient *http.Client, tmpRoot string, changes sgerrit.Changes) []error
CheckCherryPick checks if the provided GerritChanges can be merged into their target project-branches without needing a rebase. It returns a list of errors of any failures to cherry pick, or an empty slice if all cherry picks are successful.
The provided changes may span various Gerrit instances, projects, and branches. Their ordering matters, as they will be cherry picked in order from first to last.
func Clone ¶
Clone does a `git clone` on the provided repo URL into a subdirectory of the supplied dir, and returns the path to the folder of the checkout.
func FetchAndCherryPick ¶
func FetchAndCherryPick(ctx context.Context, revision *gerrit.RevisionInfo, url string, repoDir string) (bool, error)
FetchAndCherryPick attempts to cherry-pick a provided Gerrit revision into the provided local Git repo. It returns a bool indicating whether further cherry picks can be performed. It also returns an error if this fails (e.g. if the cherry-pick won't merge successfully) or nil if the cherry-pick works alright.
Invocations of this method alter the supplied Git repo, so the order of invocations is important.
Types ¶
This section is empty.