spec

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: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Label

type Label struct {
	Name        string `yaml:"name"`
	Description string `yaml:"description"`
	Color       string `yaml:"color"`
}

func (*Label) ToState

func (sp *Label) ToState() *state.Label

ToState generates a new state

type Labels

type Labels []Label

func LoadLabelsSpecFromState

func LoadLabelsSpecFromState(states []state.Label) Labels

type Protection

type Protection struct {
	Branch                     string                      `yaml:"branch"`
	RequiredStatusChecks       *RequiredStatusChecks       `yaml:"requiredStatusChecks,omitempty"`
	EnforceAdmins              *bool                       `yaml:"enforceAdmins,omitempty"`
	RequiredPullRequestReviews *RequiredPullRequestReviews `yaml:"requiredPullRequestReviews,omitempty"`
	Restrictions               *Restrictions               `yaml:"restrictions,omitempty"`
}

func (*Protection) ToState

func (sp *Protection) ToState() *state.Protection

ToState returns a new state

type Protections

type Protections []Protection

func LoadProtectionsSpecFromState

func LoadProtectionsSpecFromState(states []state.Protection) Protections

type Repo

type Repo struct {
	Description      *string `yaml:"description"`
	Homepage         *string `yaml:"homepage"`
	Private          *bool   `yaml:"private"`
	AllowMergeCommit *bool   `yaml:"allowMergeCommit"`
	AllowSquashMerge *bool   `yaml:"allowSquashMerge"`
	AllowRebaseMerge *bool   `yaml:"allowRebaseMerge"`

	Topics []string `yaml:"topics"`
}

func LoadRepoSpecFromState

func LoadRepoSpecFromState(st *state.Repo) *Repo

type RequiredPullRequestReviews

type RequiredPullRequestReviews struct {
	// DismissalRestrictions        Restrictions `yaml:"dismissalRestrictions"`
	DismissStaleReviews          bool `yaml:"dismissStaleReviews"`
	RequireCodeOwnerReviews      bool `yaml:"requireCodeOwnerReviews"`
	RequiredApprovingReviewCount int  `yaml:"requiredApprovingReviewCount"`
}

type RequiredStatusChecks

type RequiredStatusChecks struct {
	Strict   bool     `yaml:"strict"`
	Contexts []string `yaml:"contexts"`
}

type Restrictions

type Restrictions struct {
	Users []string `yaml:"users"`
	Teams []string `yaml:"teams"`
}

type Spec

type Spec struct {
	Repo        *Repo       `yaml:"repo,omitempty"`
	Labels      Labels      `yaml:"labels,omitempty"`
	Protections Protections `yaml:"protections,omitempty"`
}

Jump to

Keyboard shortcuts

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