Documentation ¶
Index ¶
- type BranchProvider
- type GitBranchProvider
- type InteractivePromptProvider
- func (s *InteractivePromptProvider) ConfirmDisablingPromotionOnOtherPullRequest(branch, env string) (bool, error)
- func (s *InteractivePromptProvider) PrintBranchDoesNotSupportAutoPromotion(branch string)
- func (s *InteractivePromptProvider) PrintNotCreatingPullRequest()
- func (s *InteractivePromptProvider) PrintPromotionAlreadyConfigured(branch, env string)
- func (s *InteractivePromptProvider) PrintPromotionConfigured(branch string, env string)
- func (s *InteractivePromptProvider) PrintPromotionDisabled(branch string)
- func (s *InteractivePromptProvider) PrintPromotionNotConfigured(branch string, env string)
- func (s *InteractivePromptProvider) WhetherToCreateMissingPullRequest() (bool, error)
- func (s *InteractivePromptProvider) WhichEnvironmentToPromoteTo(environments []string, preSelectedEnv string) (string, error)
- type Promotion
- type PromptProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BranchProvider ¶
type GitBranchProvider ¶
type GitBranchProvider struct {
// contains filtered or unexported fields
}
func NewGitBranchProvider ¶
func NewGitBranchProvider(dir string) *GitBranchProvider
func (*GitBranchProvider) GetCurrentBranch ¶
func (g *GitBranchProvider) GetCurrentBranch() (string, error)
type InteractivePromptProvider ¶
type InteractivePromptProvider struct{}
func (*InteractivePromptProvider) ConfirmDisablingPromotionOnOtherPullRequest ¶
func (s *InteractivePromptProvider) ConfirmDisablingPromotionOnOtherPullRequest(branch, env string) (bool, error)
func (*InteractivePromptProvider) PrintBranchDoesNotSupportAutoPromotion ¶
func (s *InteractivePromptProvider) PrintBranchDoesNotSupportAutoPromotion(branch string)
func (*InteractivePromptProvider) PrintNotCreatingPullRequest ¶
func (s *InteractivePromptProvider) PrintNotCreatingPullRequest()
func (*InteractivePromptProvider) PrintPromotionAlreadyConfigured ¶
func (s *InteractivePromptProvider) PrintPromotionAlreadyConfigured(branch, env string)
func (*InteractivePromptProvider) PrintPromotionConfigured ¶
func (s *InteractivePromptProvider) PrintPromotionConfigured(branch string, env string)
func (*InteractivePromptProvider) PrintPromotionDisabled ¶
func (s *InteractivePromptProvider) PrintPromotionDisabled(branch string)
func (*InteractivePromptProvider) PrintPromotionNotConfigured ¶
func (s *InteractivePromptProvider) PrintPromotionNotConfigured(branch string, env string)
func (*InteractivePromptProvider) WhetherToCreateMissingPullRequest ¶
func (s *InteractivePromptProvider) WhetherToCreateMissingPullRequest() (bool, error)
func (*InteractivePromptProvider) WhichEnvironmentToPromoteTo ¶
func (s *InteractivePromptProvider) WhichEnvironmentToPromoteTo(environments []string, preSelectedEnv string) (string, error)
type Promotion ¶
type Promotion struct {
// contains filtered or unexported fields
}
func NewDefaultPromotion ¶
func NewPromotion ¶
func NewPromotion(branchProvider BranchProvider, pullRequestProvider pr.PullRequestProvider, prompt PromptProvider) *Promotion
type PromptProvider ¶
type PromptProvider interface { // WhetherToCreateMissingPullRequest prompts user to create a pull request for current branch. WhetherToCreateMissingPullRequest() (bool, error) // WhichEnvironmentToPromoteTo prompts user to select environment to auto-promote builds of pull request to. // If empty string is returned, user opted to disable auto-promotion. WhichEnvironmentToPromoteTo(environments []string, preSelectedEnv string) (string, error) // ConfirmDisablingPromotionOnOtherPullRequest prompts user to confirm it is ok to disable auto-promotion of another // pull request having same target environment. ConfirmDisablingPromotionOnOtherPullRequest(branch, env string) (bool, error) // PrintBranchDoesNotSupportAutoPromotion prints message that master/main branch cannot be promoted. PrintBranchDoesNotSupportAutoPromotion(branch string) // PrintNotCreatingPullRequest prints message that user opted not to create pull request. PrintNotCreatingPullRequest() // PrintPromotionAlreadyConfigured prints message that given branch is configured for auto-promotion to given // environment. PrintPromotionAlreadyConfigured(branch, env string) // PrintPromotionNotConfigured prints message that promotion was not configured. PrintPromotionNotConfigured(branch, env string) // PrintPromotionConfigured prints message that promotion was correctly configured. PrintPromotionConfigured(branch, env string) // PrintPromotionDisabled prints message that promotion was disabled. PrintPromotionDisabled(branch string) }
Click to show internal directories.
Click to hide internal directories.