affinity

package
v0.0.0-...-2443087 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: BSD-3-Clause Imports: 6 Imported by: 1

Documentation

Overview

affinity assigns issues based on team mentions and those team captains. The idea is to separate the work of triaging of issues and pull requests out to a larger pool of people to make it less of a burden to be involved.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func (*Handler) AddRepo

func (h *Handler) AddRepo(owner, name string)

func (*Handler) AddTeam

func (h *Handler) AddTeam(context *ctx.Context, teamID int64) error

func (*Handler) AssignIssueToAffinityTeamCaptain

func (h *Handler) AssignIssueToAffinityTeamCaptain(context *ctx.Context, payload interface{}) error

func (*Handler) AssignIssueToAffinityTeamCaptainFromComment

func (h *Handler) AssignIssueToAffinityTeamCaptainFromComment(context *ctx.Context, payload interface{}) error

func (*Handler) AssignPRToAffinityTeamCaptain

func (h *Handler) AssignPRToAffinityTeamCaptain(context *ctx.Context, payload interface{}) error

func (*Handler) GetRepos

func (h *Handler) GetRepos() []Repo

func (*Handler) GetTeam

func (h *Handler) GetTeam(teamID int64) (Team, error)

func (*Handler) GetTeams

func (h *Handler) GetTeams() []Team

func (*Handler) RequestReviewFromAffinityTeamCaptains

func (h *Handler) RequestReviewFromAffinityTeamCaptains(context *ctx.Context, payload interface{}) error

type Repo

type Repo struct {
	Owner, Name string
}

type Team

type Team struct {
	// The team ID.
	ID int64

	// The org the team belongs to
	Org string

	// The name of the team.
	Name string

	// The mention this should match, e.g. "@jekyll/documentation"
	Mention string

	// The description of the repo.
	Description string

	// Team captains, requires at least the Login field
	Captains []*github.User
}

func NewTeam

func NewTeam(context *ctx.Context, teamId int64) (Team, error)

func (Team) RandomCaptainLogins

func (t Team) RandomCaptainLogins(num int) []string

func (Team) RandomCaptainLoginsExcluding

func (t Team) RandomCaptainLoginsExcluding(excludedLogin string, count int) []string

func (Team) String

func (t Team) String() string

Jump to

Keyboard shortcuts

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