Documentation
¶
Index ¶
- type Git
- func (g *Git) Add(files []string) error
- func (g *Git) Checkout() error
- func (g *Git) Clean() error
- func (g *Git) Clone() (string, error)
- func (g *Git) Commit(message string) error
- func (g *Git) GetBranches() (sourceBranch, workingBranch, targetBranch string)
- func (g *Git) GetChangedFiles(workingDir string) ([]string, error)
- func (g *Git) GetDirectory() (directory string)
- func (g *Git) GetURL() string
- func (g *Git) IsRemoteBranchUpToDate() (bool, error)
- func (g *Git) Push() error
- func (g *Git) PushBranch(branch string) error
- func (g *Git) PushTag(tag string) error
- type Spec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Git ¶
type Git struct {
// contains filtered or unexported fields
}
func (*Git) GetBranches ¶ added in v0.53.0
func (*Git) GetDirectory ¶
GetDirectory returns the working git directory.
func (*Git) IsRemoteBranchUpToDate ¶ added in v0.45.0
IsRemoteBranchUpToDate checks if the working branch should be push to remote
func (*Git) PushBranch ¶ added in v0.44.0
PushBranch push tags
type Spec ¶ added in v0.26.0
type Spec struct {
// URL specifies the git url
URL string `yaml:",omitempty" jsonschema:"required"`
// Username specifies the username for http authentication
Username string `yaml:",omitempty"`
// Password specifies the password for http authentication
Password string `yaml:",omitempty"`
// Branch specifies the git branch
Branch string `yaml:",omitempty"`
// User specifies the git commit author
User string `yaml:",omitempty"`
// Email specifies the git commit email
Email string `yaml:",omitempty"`
// Directory specifies the directory to use for cloning the repository
Directory string `yaml:",omitempty"`
// Force is used during the git push phase to run `git push --force`.
Force bool `yaml:",omitempty"`
// CommitMessage contains conventional commit metadata as type or scope, used to generate the final commit message.
CommitMessage commit.Commit `yaml:",omitempty"`
// GPG key and passphrased used for commit signing
GPG sign.GPGSpec `yaml:",omitempty"`
}
Spec contains settings to manipulate a git repository.
func (*Spec) Merge ¶ added in v0.28.0
Merge returns nil if it successfully merges the child Spec into target receiver. Please note that child attributes always overrides receiver's
func (*Spec) MergeFromEnv ¶ added in v0.28.0
MergeFromEnv updates the target receiver with the "non zero-ed" environment variables
Click to show internal directories.
Click to hide internal directories.