change

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action rune
const (
	NoOp   Action = 0
	Create Action = '+'
	Update Action = '~'
	Delete Action = '-'
)

type Change

type Change interface {
	String() string
	Apply(ctx context.Context, repoOwner string, repoName string) error
}

type ChangeSet

type ChangeSet []Change

type LabelChange

type LabelChange struct {
	Action Action
	Before *state.Label
	After  *state.Label
}

func GetLabelChangeSet

func GetLabelChangeSet(st []state.Label, sp spec.Labels) []*LabelChange

func (*LabelChange) Apply

func (c *LabelChange) Apply(ctx context.Context, repoOwner string, repoName string) error

func (*LabelChange) String

func (c *LabelChange) String() string

type ProtectionChange

type ProtectionChange struct {
	Action Action
	Before *state.Protection
	After  *state.Protection
}

func GetProtectionChangeSet

func GetProtectionChangeSet(st []state.Protection, sp spec.Protections) []*ProtectionChange

func (*ProtectionChange) Apply

func (c *ProtectionChange) Apply(ctx context.Context, repoOwner string, repoName string) error

func (*ProtectionChange) String

func (c *ProtectionChange) String() string

FIXME: duplicated

type RepoChange

type RepoChange struct {
	Action Action
	Before *state.Repo
	After  *state.Repo
}

func GetRepoChange

func GetRepoChange(st *state.Repo, sp *spec.Repo) *RepoChange

func (*RepoChange) Apply

func (c *RepoChange) Apply(ctx context.Context, repoOwner string, repoName string) error

func (*RepoChange) String

func (c *RepoChange) String() string

Jump to

Keyboard shortcuts

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