entity

package
v0.15.6 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 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 Actor added in v0.15.0

type Actor struct {
	Login string
	Type  string
}

type Comment added in v0.15.0

type Comment struct {
	ID     int
	Body   string
	Author Actor
}

type Commit

type Commit struct {
	// Commit hash
	Hash string
	// Commit message
	Message string
}

Commit that doesn't follow the conventional commit style

type Configuration added in v0.11.0

type Configuration struct {
	Token         string
	Draft         bool
	Label         string
	Strict        bool
	Close         bool
	TitlePattern  string
	CommitPattern string
	BranchPattern string
	Message       string
	FileChanges   int
	Issue         bool
	Body          bool
	Bot           bool
	Signed        bool
	Verbose       bool
	Edit          bool
	IgnoredUsers  []string

	RestURL    string
	GraphQLURL string
}

Configuration is a configuration object that is parsed from the action input

func ReadConfig

func ReadConfig() (*Configuration, error)

ReadConfig reads environment variables for input values which are supplied from an action runner and create Conventional PR's configuration from it

type Event

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

Event that triggers the action

func ReadEvent

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

ReadEvent reads and parse event meta definition

type IssueReference added in v0.15.0

type IssueReference struct {
	Meta
	Number int
}

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.15.0

type PullRequest struct {
	Number  int
	Title   string
	Body    string
	Branch  string
	IsDraft bool
	Changes int
	Author  Actor

	Repository Meta
}

type PullRequestResult added in v0.11.0

type PullRequestResult struct {
	Validation []*ValidationResult
	Whitelist  []*WhitelistResult
}

PullRequestResult is intermediary type to combine validation and whitelist results

type ValidationResult

type ValidationResult struct {
	Name   string
	Active bool
	Result error
}

ValidationResult represents validator checking result on a pull request

type WhitelistResult

type WhitelistResult struct {
	Name   string
	Active bool
	Result bool
}

WhitelistResult represents whitelist checking result on a pull request

Jump to

Keyboard shortcuts

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