ezghsa

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidSeverity = errors.New("severity must be low, medium, high, or critical")

Functions

func DefaultHttpClient

func DefaultHttpClient() *http.Client

func FilterAlerts

func FilterAlerts(alerts []*github.DependabotAlert, fn func(*github.DependabotAlert) bool) []*github.DependabotAlert

func Hosts

func Hosts() (map[string]Config, error)

Types

type App

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

func New

func New(httpClient *http.Client) *App

func (*App) CheckAlertsEnabled

func (app *App) CheckAlertsEnabled(ownerName string, repoName string) (bool, error)

func (*App) GetAllAlerts added in v0.2.0

func (app *App) GetAllAlerts(ownerName string, repoName string) ([]*github.DependabotAlert, error)

func (*App) GetMyRepos

func (app *App) GetMyRepos() ([]*github.Repository, error)

func (*App) GetOpenAlerts

func (app *App) GetOpenAlerts(ownerName string, repoName string) ([]*github.DependabotAlert, error)

func (*App) GetOrgRepos added in v0.2.0

func (app *App) GetOrgRepos(org string) ([]*github.Repository, error)

func (*App) GetRepos

func (app *App) GetRepos(ownerRepoNames []string) ([]*github.Repository, error)

type Config

type Config struct {
	OAuthToken string `yaml:"oauth_token"`
}

type SeverityLevel

type SeverityLevel int
const (
	Unknown SeverityLevel = iota
	Low
	Medium
	High
	Critical
)

func Severity

func Severity(s string) (SeverityLevel, error)

func (SeverityLevel) Abbrev

func (s SeverityLevel) Abbrev() string

func (SeverityLevel) String

func (s SeverityLevel) String() string

Jump to

Keyboard shortcuts

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