Documentation ¶
Index ¶
- func DownloadCommitMsgHook(ctx context.Context, g gerrit.GerritInterface, co git.Checkout) error
- func SetChangeLabels(ctx context.Context, g gerrit.GerritInterface, ci *gerrit.ChangeInfo, ...) error
- func SetupGerrit(ctx context.Context, co git.Checkout, g gerrit.GerritInterface) error
- func UnsetWIP(ctx context.Context, g gerrit.GerritInterface, change *gerrit.ChangeInfo, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadCommitMsgHook ¶
DownloadCommitMsgHook downloads the Gerrit Change-Id hook and installs it in the given git checkout.
func SetChangeLabels ¶
func SetChangeLabels(ctx context.Context, g gerrit.GerritInterface, ci *gerrit.ChangeInfo, emails []string, dryRun bool) error
SetChangeLabels sets the necessary labels on the given change, marking it ready for review and starting the commit queue (or submitting the change outright, if there is no configured commit queue).
func SetupGerrit ¶
SetupGerrit performs additional setup for a Checkout which uses Gerrit. This is required for all users of GitCheckoutUploadGerritRollFunc. TODO(borenet): This is needed for RepoManagers which use NewDEPSLocal, since they need to pass in a GitCheckoutUploadRollFunc but can't do other initialization. Find a way to make this unnecessary.
func UnsetWIP ¶
func UnsetWIP(ctx context.Context, g gerrit.GerritInterface, change *gerrit.ChangeInfo, issueNum int64) error
UnsetWIP is a helper function for unsetting the WIP bit on a Gerrit CL if necessary. Either the change or issueNum parameter is required; if change is not provided, it will be loaded from Gerrit. unsetWIP checks for a nil GerritInterface, so this is safe to call from RepoManagers which don't use Gerrit. If we fail to unset the WIP bit, unsetWIP abandons the change.
Types ¶
This section is empty.