config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: GPL-3.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 Config

type Config struct {
	GitHub      GitHub
	GithubEvent GithubEvent
	Inputs      Inputs
}

func LoadConfigFromEnv

func LoadConfigFromEnv() (*Config, error)

func (Config) Print

func (c Config) Print()

type GitHub

type GitHub struct {
	Workflow   string `env:"GITHUB_WORKFLOW"`
	Action     string `env:"GITHUB_ACTION"`
	Actor      string `env:"GITHUB_ACTOR"`
	Repository string `env:"GITHUB_REPOSITORY"`
	Commit     string `env:"GITHUB_SHA"`
	EventName  string `env:"GITHUB_EVENT_NAME"`
	EventPath  string `env:"GITHUB_EVENT_PATH"`
	Ref        string `env:"GITHUB_REF"`
}

type GithubEvent

type GithubEvent struct {
	PullRequest struct {
		Commits int `json:"commits"`
	} `json:"pull_request,omitempty"`
	Commits []interface{} `json:"commits,omitempty"`
}

func (GithubEvent) TotalCommits

func (e GithubEvent) TotalCommits() int

type Inputs

type Inputs struct {
	Paths []string `env:"INPUT_PATHS" envSeparator:"\n"`
}

Jump to

Keyboard shortcuts

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