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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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