stash

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Spec

type Spec struct {
	client.Spec `yaml:",inline,omitempty"`
	// CommitMessage represents conventional commit metadata as type or scope, used to generate the final commit message.
	CommitMessage commit.Commit `yaml:",omitempty"`
	// Directory specifies where the github repository is cloned on the local disk
	Directory string `yaml:",omitempty"`
	// Email specifies which emails to use when creating commits
	Email string `yaml:",omitempty"`
	// Force is used during the git push phase to run `git push --force`.
	Force bool `yaml:",omitempty"`
	// GPG key and passphrased used for commit signing
	GPG sign.GPGSpec `yaml:",omitempty"`
	// Owner specifies repository owner
	Owner string `yaml:",omitempty" jsonschema:"required"`
	// Repository specifies the name of a repository for a specific owner
	Repository string `yaml:",omitempty" jsonschema:"required"`
	// User specifies the user of the git commit messages
	User string `yaml:",omitempty"`
	// Branch specifies which Bitbucket repository branch to work on
	Branch string `yaml:",omitempty"`
}

Spec defines settings used to interact with Bitbucket release

func (*Spec) Validate

func (s *Spec) Validate() error

type Stash

type Stash struct {
	// Spec contains inputs coming from updatecli configuration
	Spec Spec

	HeadBranch string
	// contains filtered or unexported fields
}

Stash contains information to interact with Stash api

func New

func New(spec interface{}, pipelineID string) (*Stash, error)

New returns a new valid Bitbucket object.

func (*Stash) Add

func (g *Stash) Add(files []string) error

Add run `git add`.

func (*Stash) Checkout

func (g *Stash) Checkout() error

Checkout create and then uses a temporary git branch.

func (*Stash) Clean

func (g *Stash) Clean() error

Clean deletes github working directory.

func (*Stash) Clone

func (g *Stash) Clone() (string, error)

Clone run `git clone`.

func (*Stash) Commit

func (g *Stash) Commit(message string) error

Commit run `git commit`.

func (*Stash) GetChangedFiles

func (g *Stash) GetChangedFiles(workingDir string) ([]string, error)

func (*Stash) GetDirectory

func (g *Stash) GetDirectory() (directory string)

GetDirectory returns the local git repository path.

func (*Stash) IsRemoteBranchUpToDate

func (g *Stash) IsRemoteBranchUpToDate() (bool, error)

IsRemoteBranchUpToDate checks if the branch reference name is published on on the default remote

func (*Stash) Push

func (g *Stash) Push() error

Push run `git push` to the corresponding Bitbucket remote branch if not already created.

func (*Stash) PushBranch

func (g *Stash) PushBranch(branch string) error

PushBranch push branch

func (*Stash) PushTag

func (g *Stash) PushTag(tag string) error

PushTag push tags

func (*Stash) SearchTags

func (g *Stash) SearchTags() (tags []string, err error)

Retrieve git tags from a remote bitbucket repository

Jump to

Keyboard shortcuts

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