utils

package
v1.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Images
	NoVulnerabilityBannerSource imageSource = "noVulnerabilityBanner.png"
	VulnerabilitiesBannerSource imageSource = "vulnerabilitiesBanner.png"

	// Frogbot label
	LabelName        frogbotLabel = "🐸 frogbot"
	LabelDescription frogbotLabel = "triggers frogbot scan"
	LabelColor       frogbotLabel = "4AB548"

	WatchesDelimiter = ","
)

Variables

View Source
var ErrLabelCreated = fmt.Errorf("label '%s' was created. Please label this pull request to trigger an Xray scan", string(LabelName))
View Source
var ErrUnlabel = fmt.Errorf("please add the '%s' label to trigger an Xray scan", string(LabelName))

Functions

func Chdir

func Chdir(dir string) (func(), error)

func GetNoVulnerabilitiesBanner

func GetNoVulnerabilitiesBanner() string

func GetSeverityTag

func GetSeverityTag(iconName string) string

func GetVulnerabilitiesBanner

func GetVulnerabilitiesBanner() string

Types

type FrogbotParams

type FrogbotParams struct {
	JFrogEnvParams
	GitParam
	InstallCommandName string
	InstallCommandArgs []string
}

func GetParamsAndClient

func GetParamsAndClient() (*FrogbotParams, vcsclient.VcsClient, error)

type GitParam

type GitParam struct {
	GitProvider   vcsutils.VcsProvider
	RepoOwner     string
	Token         string
	Repo          string
	BaseBranch    string
	PullRequestID int
}

type JFrogEnvParams

type JFrogEnvParams struct {
	Server  coreconfig.ServerDetails
	Project string
	Watches string
}

Jump to

Keyboard shortcuts

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