utils

package
v1.0.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 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 scan pr"
	LabelDescription frogbotLabel = "triggers frogbot scan"
	LabelColor       frogbotLabel = "4AB548"

	WatchesDelimiter = ","

	// Comment
	TableHeder = "\n| SEVERITY | IMPACTED PACKAGE | VERSION | FIXED VERSIONS | COMPONENT | COMPONENT VERSION | CVE\n" +
		":--: | -- | -- | -- | -- | :--: | --"
	WhatIsFrogbotMd = "\n\n[What is Frogbot?](https://github.com/jfrog/frogbot#frogbot)"
)

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 GetBanner

func GetBanner(banner imageSource) string

func GetSeverityTag

func GetSeverityTag(iconName string) 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