config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext(ctx context.Context, configFile string) (context.Context, error)

NewContext loads a configuration file into the Spec struct

func OverrideConfig

func OverrideConfig(ctx context.Context, config *Spec) context.Context

OverrideConfig writes a new context with the the new configuration

Types

type BranchProtections

type BranchProtections map[string][]string

BranchProtections represents github's branch protections

type Collaborator

type Collaborator struct {
	Username   string
	Permission string
}

Collaborator represents a github collaborator

type Github

type Github struct {
	Organization  string
	Token         string
	Teams         []*Team
	Collaborators []*Collaborator
	Labels        []*Label
	Webhooks      []*Webhook
	Protections   BranchProtections
	// RemoveDefaultLabels Remove GitHub's default labels?
	RemoveDefaultLabels bool
}

Github represents the github configurations

type Label

type Label struct {
	Name  string
	Color string
}

Label represents a github label

type Spec

type Spec struct {
	Github        Github
	GithubTestOrg Github
}

Spec represents the global app configuration

func WithContext

func WithContext(ctx context.Context) *Spec

WithContext returns a logrus logger from the context

type Team

type Team struct {
	ID         int
	Permission string
}

Team represents a github team

type Webhook

type Webhook struct {
	Type   string
	Config map[string]interface{}
}

Webhook represents a github webhook

Jump to

Keyboard shortcuts

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