prlimit

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllowName

type AllowName struct {
	ID        int       `gorm:"id"`
	Owner     string    `gorm:"owner"`
	Repo      string    `gorm:"repo"`
	Username  string    `gorm:"	username"`
	CreatedAt time.Time `gorm:"created_at"`
}

AllowName define allow name list database structure

type ApproveRecord

type ApproveRecord struct {
	ID        int    `gorm:"column:id"`
	Owner     string `gorm:"column:owner"`
	Repo      string `gorm:"column:repo"`
	Github    string `gorm:"column:github"`
	CreatedAt string `gorm:"column:created_at"`
}

type BlockName

type BlockName struct {
	ID        int       `gorm:"id"`
	Owner     string    `gorm:"owner"`
	Repo      string    `gorm:"repo"`
	Username  string    `gorm:"	username"`
	CreatedAt time.Time `gorm:"created_at"`
}

BlockName define block name list database structure

type PrLimit

type PrLimit interface {
	Ready()
	ProcessPullRequestEvent(event *github.PullRequestEvent)
	GetAllowList() ([]string, error)
	AddAllowList(username string) error
	RemoveAllowList(username string) error
	GetBlockList() ([]string, error)
	AddBlockList(username string) error
	RemoveBlockList(username string) error
}

PrLimit defines methods of PR limit module

func Init

func Init(repo *config.RepoConfig, opr *operator.Operator) PrLimit

Init create PR limit middleware instance

Jump to

Keyboard shortcuts

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