entity

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Branch added in v0.1.1

type Branch struct {
	// actual branch name
	Ref string `json:"ref"`
}

type Configuration

type Configuration struct {
	Token   string
	Newline bool
	Include string
}

func CreateConfiguration

func CreateConfiguration() (*Configuration, error)

type Event

type Event struct {
	// action name
	Action string `json:"action"`
	// pull request number
	Number int `json:"number"`
	// pull request 'object'
	PullRequest PullRequest `json:"pull_request"`
}

Event that triggers the action

func ReadEvent

func ReadEvent(fsys fs.FS) (*Event, error)

ReadEvent reads and parse event meta definition

type Meta

type Meta struct {
	Name  string
	Owner string
}

Meta is a struct that represents repository's metadata

func CreateMeta

func CreateMeta(name string) (*Meta, error)

CreateMeta from a GitHub's repository string

type PullRequest added in v0.1.1

type PullRequest struct {
	// branch head
	Head Branch `json:"head"`
}

type Validation added in v0.1.1

type Validation struct {
	Filename string
	Valid    bool
}

Validaton represents config validation result

func GetInvalidValidations added in v0.1.1

func GetInvalidValidations(validations []Validation) []Validation

GetInvalidValidations returns validations that are deemed invalid

Jump to

Keyboard shortcuts

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