github

package
v0.0.1-pre3 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRepositoryNotFound = errors.New("the specified triage repository does not exist")

Functions

func ParseSlug

func ParseSlug(slug string) (org, repo string, err error)

func WithTriageOrg

func WithTriageOrg(org string) fnOption

func WithTriageRepo

func WithTriageRepo(repo string) fnOption

Types

type EmbeddedMessage

type EmbeddedMessage struct {
	BranchID string `json:"branch_id"`
	api.Triage
}

type Options

type Options struct {
	// Org/Repo where VexFlow will store the triage processes
	Org  string
	Repo string

	// Labels
	LabelAffected           string
	LabelNotAffected        string
	LabelFixed              string
	LabelUnderInvestigation string
}

type Owners

type Owners struct {
	Approvers         []string          `json:"approvers"          yaml:"approvers"`
	Reviewers         []string          `json:"reviewers"          yaml:"reviewers"`
	EmeritusApprovers []string          `json:"emeritus_approvers" yaml:"emeritus_approvers"`
	Alias             map[string]string `json:"aliases"            yaml:"aliases"`
}

type TriageHandler

type TriageHandler struct {
	Owners *Owners
	// contains filtered or unexported fields
}

func New

func New(funcs ...fnOption) (*TriageHandler, error)

func (*TriageHandler) AppendPublishNotice

func (th *TriageHandler) AppendPublishNotice(t *api.Triage, notice *api.StatementNotice) error

AppendPublishNotice appends publishing notices to the issue conversation

func (*TriageHandler) CloseTriage

func (th *TriageHandler) CloseTriage(t *api.Triage) error

CloseTriage translates to closing the issue on github.

func (*TriageHandler) CloseTriageWithMessage

func (th *TriageHandler) CloseTriageWithMessage(t *api.Triage, msg string) error

CloseTriageWithMessage closes an open triage leaving a comment before doing so.

func (*TriageHandler) CreateTriage

func (th *TriageHandler) CreateTriage(branch *api.Branch, vuln *api.Vulnerability) (*api.Triage, error)

CreateTriage starts a new triage for a vulnerability

func (*TriageHandler) EnsureOwnersData

func (th *TriageHandler) EnsureOwnersData() error

EnsureOwnersData reads the OWNERS data if its not set.

func (*TriageHandler) ListBranchTriages

func (th *TriageHandler) ListBranchTriages(branch *api.Branch) ([]*api.Triage, error)

ListTriages returns a list of all triages in a repo for a branch

func (*TriageHandler) ReadOwners

func (th *TriageHandler) ReadOwners() error

ReadOwners fetches the owners file from your github repo

func (*TriageHandler) ReadStatusList

func (th *TriageHandler) ReadStatusList([]*api.Vulnerability)

ReadStatusList

func (*TriageHandler) ReadTriageStatus

func (th *TriageHandler) ReadTriageStatus(t *api.Triage) error

ReadTriageStatus enriches a triage with data from the comment history

Jump to

Keyboard shortcuts

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