Documentation ¶
Overview ¶
Package app is the main application
Index ¶
- Variables
- func BuildConfig()
- func ComposerUpdate() (string, error)
- func CreateMergeBranch(diff ComposerDiff) error
- func CreateMergeRequest(title, description string) error
- func MRExists(checksum string) bool
- func RemoveOldMRs() error
- func SwitchBranch(branch string) error
- type ComposerDiff
- type ComposerDiffPackage
- type ComposerLock
- type Package
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Config struct Config struct { // ComposerPath binary path ComposerPath string // ComposerFlags composer flags ComposerFlags []string // ComposerLockFile file path ComposerLockFile string // GitPath binary path GitPath string // Repo is the directory where the repository is RepoDir string // GitUser username GitUser string // GitEmail username GitEmail string // GitBranch branch name GitBranch string // MRBranch is the branch name for the merge request MRBranch string // MRTitlePrefix is the first part of the merge request title MRTitlePrefix string // GitCommitTitle is the first line of the git commit message GitCommitTitle string } )
Functions ¶
func CreateMergeBranch ¶
func CreateMergeBranch(diff ComposerDiff) error
CreateMergeBranch creates the merge branch using git
func CreateMergeRequest ¶
CreateMergeRequest will create a merge request for the branch setting the title, description and other options
func MRExists ¶
MRExists checks to see if an existing merge request exists based on checksum of the content
func RemoveOldMRs ¶
func RemoveOldMRs() error
RemoveOldMRs will remove old merge requests (if enabled) by deleting the branches
Types ¶
type ComposerDiff ¶
type ComposerDiff struct { Checksum string Packages []ComposerDiffPackage Description string CommitMessage string }
ComposerDiff struct
func CompareDiffs ¶
func CompareDiffs(pre, post ComposerLock) ComposerDiff
CompareDiffs will return a ComposerDiff struct for parsing
type ComposerDiffPackage ¶
type ComposerDiffPackage struct { Name string PreVersion string PostVersion string // URL string // url CompareURL string // url }
ComposerDiffPackage struct
type ComposerLock ¶
type ComposerLock struct { Checksum string Packages []Package `json:"packages"` PackagesDev []Package `json:"packages-dev"` }
ComposerLock struct
func ParseComposerLock ¶
func ParseComposerLock() (ComposerLock, error)
ParseComposerLock parses a composer lock file
Source Files ¶
Click to show internal directories.
Click to hide internal directories.