internal

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 GithubClient

type GithubClient interface {
	GetPullRequest(context.Context, *entity.Meta, int) (*entity.PullRequest, error)
	GetIssue(context.Context, *entity.Meta, int) (*entity.IssueReference, error)
	GetIssueReferences(context.Context, *entity.Meta, int) ([]*entity.IssueReference, error)
	GetCommits(context.Context, *entity.Meta, int) ([]*entity.Commit, error)
	GetPermissions(context.Context, *entity.Meta, string) ([]string, error)
	GetSelf(context.Context) (*entity.Actor, error)
	GetComments(context.Context, *entity.Meta, int) ([]*entity.Comment, error)

	CreateComment(context.Context, *entity.Meta, int, string) error
	EditComment(context.Context, *entity.Meta, int, string) error
	Close(context.Context, *entity.Meta, int) error

	Label(context.Context, *entity.Meta, int, string) error
}

GithubClient handles all interaction with Github's API Designed this way for easier testing

func NewGithubClient

func NewGithubClient(config *entity.Configuration) GithubClient

NewGithubClient instatiates a new GitHub client API interface

type Validator

type Validator interface {
	IsValid(context.Context, *entity.PullRequest) *entity.ValidationResult
}

Validator validates if a pull request follows a convention or not

type Whitelist

type Whitelist interface {
	IsWhitelisted(context.Context, *entity.PullRequest) *entity.WhitelistResult
}

Whitelist checks if a pull request validation may be skipped or not

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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