state

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: 5 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
	Description string
	Color       string
}

func FindLabels

func FindLabels(ctx context.Context, owner string, repo string) ([]Label, error)

func (*Label) Create

func (l *Label) Create(ctx context.Context, repoOwner string, repoName string) error

func (*Label) Destroy

func (l *Label) Destroy(ctx context.Context, repoOwner string, repoName string) error

func (*Label) Update

func (l *Label) Update(ctx context.Context, repoOwner string, repoName string) error

type Protection

type Protection struct {
	Branch                     string
	RequiredStatusChecks       *RequiredStatusChecks
	EnforceAdmins              *bool
	RequiredPullRequestReviews *RequiredPullRequestReviews
	Restrictions               *Restrictions
}

func FindProtections

func FindProtections(ctx context.Context, owner string, repo string) ([]Protection, error)

func NewProtection

func NewProtection(branch string) *Protection

func (*Protection) Destroy

func (p *Protection) Destroy(ctx context.Context, repoOwner string, repoName string) error

func (*Protection) Update

func (p *Protection) Update(ctx context.Context, repoOwner string, repoName string) error

type Repo

type Repo struct {
	Name             string // required?
	Owner            string
	Description      string
	Homepage         string
	Private          bool
	AllowSquashMerge bool
	AllowMergeCommit bool
	AllowRebaseMerge bool
	Topics           []string
}

func FindRepo

func FindRepo(ctx context.Context, owner string, name string) (*Repo, error)

func (*Repo) Update

func (s *Repo) Update(ctx context.Context, repoOwner string, repoName string) error

type RequiredPullRequestReviews

type RequiredPullRequestReviews struct {
	// DismissalRestrictions        Restrictions
	DismissStaleReviews          bool
	RequireCodeOwnerReviews      bool
	RequiredApprovingReviewCount int
}

type RequiredStatusChecks

type RequiredStatusChecks struct {
	Strict   bool
	Contexts []string
}

type Restrictions

type Restrictions struct {
	Users []string
	Teams []string
}

Jump to

Keyboard shortcuts

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