checkout

package
v0.0.0-...-72e4f35 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package checkout supports checking out git repositories for testing during Buildbucket builds.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Checkout

func Checkout(ctx context.Context, input *buildbucketpb.Build_Input, repoURL url.URL, defaultRevision, dir string) error

Checkout checks out the git repo at repoURL according to the given build input.

defaultRevision specifies the revision to check out if the build was triggered by a commit or change on a *different* repository, in which case we can't use the build input to determine which revision of `repoURL` to check out.

func GitilesChangeRef

func GitilesChangeRef(change *buildbucketpb.GerritChange) string

Returns the Gitiles ref for a gerrit changeNumber. The ref has the form xx/yyyy/zz where xx is `yyyy modulo 100` (always 2 digits), and zz is the patchset number.

func RemoveCodeReviewSuffix

func RemoveCodeReviewSuffix(host string) string

Converts foo-review.googlesource.com to foo.googlesource.com

Types

This section is empty.

Jump to

Keyboard shortcuts

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