jx: github.com/jenkins-x/jx/pkg/gits/operations Index | Files

package operations

import "github.com/jenkins-x/jx/pkg/gits/operations"


Package Files


func AddDependencyMatrixUpdatePaths Uses

func AddDependencyMatrixUpdatePaths(upstreamDependencyAsset *gits.GitReleaseAsset, updateDependency *v1.DependencyUpdate) ([]*v1.DependencyUpdate, error)

AddDependencyMatrixUpdatePaths retrieves the upstreamDependencyAsset and converts it to a slice of DependencyUpdates, prepending the updateDependency to the path

type ChangeFilesFn Uses

type ChangeFilesFn func(dir string, gitInfo *gits.GitRepository) ([]string, error)

ChangeFilesFn is the function called to create the pull request

func CreateChartChangeFilesFn Uses

func CreateChartChangeFilesFn(name string, version string, kind string, pro *PullRequestOperation, helmer helm.Helmer,
    vaultClient secreturl.Client, handles util.IOFileHandles) ChangeFilesFn

CreateChartChangeFilesFn creates the ChangeFilesFn for updating the chart with name to version. If the version is empty it will fetch the latest version using helmer, using the vaultClient to get the repo creds or prompting using in, out and outErr

func CreatePullRequestBuildersFn Uses

func CreatePullRequestBuildersFn(version string) ChangeFilesFn

CreatePullRequestBuildersFn creates the ChangeFilesFn that will update the gcr.io/jenkinsxio/builder-*.yml images

func CreatePullRequestMLBuildersFn Uses

func CreatePullRequestMLBuildersFn(version string) ChangeFilesFn

CreatePullRequestMLBuildersFn creates the ChangeFilesFn that will update the gcr.io/jenkinsxio/builder-machine-learning*.yml images

func CreatePullRequestRegexFn Uses

func CreatePullRequestRegexFn(version string, regex string, files ...string) (ChangeFilesFn, error)

CreatePullRequestRegexFn creates the ChangeFilesFn that will apply the regex, updating the matches to version over the files

type PullRequestOperation Uses

type PullRequestOperation struct {
    GitURLs       []string
    SrcGitURL     string
    Base          string
    Component     string
    BranchName    string
    Version       string
    DryRun        bool
    SkipCommit    bool
    AuthorName    string
    AuthorEmail   string
    SkipAutoMerge bool
    Labels        []string

PullRequestOperation provides a way to execute a PullRequest operation using Git

func (PullRequestOperation) CreateDependencyUpdatePRDetails Uses

func (o PullRequestOperation) CreateDependencyUpdatePRDetails(kind string, srcRepoURL string, destHost string, fromVersion string, toVersion string, component string) (string, *gits.PullRequestDetails, *v1.DependencyUpdate, []gits.GitReleaseAsset, error)

CreateDependencyUpdatePRDetails creates the PullRequestDetails for a pull request, taking the kind of change it is (an id) the srcRepoUrl for the repo that caused the change, the destRepo for the repo receiving the change, the fromVersion and the toVersion

func (*PullRequestOperation) CreatePullRequest Uses

func (o *PullRequestOperation) CreatePullRequest(kind string, update ChangeFilesFn) (*gits.PullRequestInfo, error)

CreatePullRequest will fork (if needed) and pull a git repo, then perform the update, and finally create or update a PR for the change. Any open PR on the repo with the `updatebot` label will be updated.

func (*PullRequestOperation) CreatePullRequestGitReleasesFn Uses

func (o *PullRequestOperation) CreatePullRequestGitReleasesFn(name string) ChangeFilesFn

CreatePullRequestGitReleasesFn creates the ChangeFilesFn that will update the git/ directory in the versions repo, using the git provider release api

func (*PullRequestOperation) WrapChangeFilesWithCommitFn Uses

func (o *PullRequestOperation) WrapChangeFilesWithCommitFn(kind string, fn ChangeFilesFn) ChangeFilesFn

WrapChangeFilesWithCommitFn wraps the passed ChangeFilesFn in a commit. This is useful for creating multiple commits to batch e.g. in a single PR push/creation

Package operations imports 25 packages (graph) and is imported by 2 packages. Updated 2020-05-29. Refresh now. Tools for package owners.