Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEnsureNaming ¶
func NewEnsureNaming(appIO io.IO, conf *configuration.Configuration, repo git.Repo) hooks.Action
func NewPreventPushOfFixupAndSquashCommits ¶
func NewPreventPushOfFixupAndSquashCommits(appIO io.IO, conf *configuration.Configuration, repo git.Repo) hooks.Action
Types ¶
type EnsureNaming ¶
type EnsureNaming struct {
// contains filtered or unexported fields
}
EnsureNaming prevents you from pushing to branches not following a given naming scheme.
Example configuration:
{ "run": "CaptainHook::Branch.EnsureNaming", "options": { "regex": "feature/[a-z]\-+[0-9]+" } }
func (*EnsureNaming) IsApplicableFor ¶
func (a *EnsureNaming) IsApplicableFor(hook string) bool
func (*EnsureNaming) Run ¶
func (a *EnsureNaming) Run(action *configuration.Action) error
type PreventPushOfFixupAndSquashCommits ¶
type PreventPushOfFixupAndSquashCommits struct {
// contains filtered or unexported fields
}
PreventPushOfFixupAndSquashCommits prevents you from pushing fixup! or squash! commits. Either for every branch in general or for a given list of branches. Only applicable for 'pre-push' hooks.
Example configuration:
{ "run": "CaptainHook::Branch.BlockFixupAndSquashCommits", "options": { "block-squash-commits": true, "block-fixup-commits": true, "branches-to-protect": ["main", "master", "integration"] } }
func (*PreventPushOfFixupAndSquashCommits) IsApplicableFor ¶
func (a *PreventPushOfFixupAndSquashCommits) IsApplicableFor(hook string) bool
func (*PreventPushOfFixupAndSquashCommits) Run ¶
func (a *PreventPushOfFixupAndSquashCommits) Run(action *configuration.Action) error
Click to show internal directories.
Click to hide internal directories.