model

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo added in v0.4.0

type Repo struct {
	Name    string
	Project []string
	Action  RepoAction
	// contains filtered or unexported fields
}

type RepoAction added in v0.4.0

type RepoAction struct {
	Required []string
	Allowed  []string
	// contains filtered or unexported fields
}

func (*RepoAction) IsAllowed added in v0.4.0

func (ra *RepoAction) IsAllowed(name string) bool

func (*RepoAction) IsRequired added in v0.4.0

func (ra *RepoAction) IsRequired(name string) bool

type Repos added in v0.4.0

type Repos map[string]Repo

func LoadRepos added in v0.4.0

func LoadRepos(path string, githubRepos []string) (Repos, error)

LoadRepos will following the neatest overwrite rule.

func (Repos) ParsedProjects added in v0.4.0

func (r Repos) ParsedProjects() map[string][]string

type Role

type Role string
const (
	RoleAdmin       Role = "admin"
	RoleMaintainer  Role = "maintainer"
	RoleCommitter   Role = "committer"
	RoleReviewer    Role = "reviewer"
	RoleContributor Role = "contributor"
)

func (Role) String

func (r Role) String() string

type Statistic added in v0.3.0

type Statistic struct {
	PROpened    uint
	PRClosed    uint
	IssueOpened uint
	IssueClosed uint
}

Statistic count events we needed

func (*Statistic) CountIssueClose added in v0.3.0

func (s *Statistic) CountIssueClose()

CountIssueClose add IssueClosed counter

func (*Statistic) CountIssueOpen added in v0.3.0

func (s *Statistic) CountIssueOpen()

CountIssueOpen add IssueOpened counter

func (*Statistic) CountPRClose added in v0.3.0

func (s *Statistic) CountPRClose()

CountPRClose add PRClosed counter

func (*Statistic) CountPROpen added in v0.3.0

func (s *Statistic) CountPROpen()

CountPROpen add PROpened counter

func (Statistic) FormatPrint added in v0.3.0

func (s Statistic) FormatPrint() string

FormatPrint format statistic as print needed

func (*Statistic) IsBlank added in v0.3.0

func (s *Statistic) IsBlank() bool

IsBlank check whether the statistic is blank (each field equals 0)

func (Statistic) String added in v0.3.0

func (s Statistic) String() string

type Statistics added in v0.3.0

type Statistics []Statistic

func (Statistics) Sum added in v0.3.0

func (s Statistics) Sum() Statistic

Sum all statistics and return the final result as a Statistic

type Team

type Team struct {
	Project string
	Role    Role
	Members []string
}

type Teams

type Teams map[string]Team

func LoadTeams

func LoadTeams(path string) (Teams, error)

type User

type User struct {
	Email string `toml:"email"`
}

type Users

type Users map[string]User

func LoadUsers

func LoadUsers(path string) (Users, error)

Jump to

Keyboard shortcuts

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