branch

package
v0.0.0-...-5566b07 Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: MIT Imports: 11 Imported by: 0

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

Jump to

Keyboard shortcuts

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