comment

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForIssues

func CheckForIssues(analysis *api.SecurityAnalysis) (bool, int)

CheckForIssues determines if there are issues to report

func FormatComment

func FormatComment(analysis *api.SecurityAnalysis, consoleURL string) string

FormatComment creates a markdown comment from analysis results using the shared template

func FormatCommentFallback

func FormatCommentFallback(analysis *api.SecurityAnalysis, consoleURL string) string

FormatCommentFallback provides a basic format if template rendering fails

func FormatInlineComment

func FormatInlineComment(issue api.CodeMitigationItem) string

FormatInlineComment creates the message for an inline code comment Includes a hidden marker for duplicate detection

func SanitizePath

func SanitizePath(path string) string

SanitizePath ensures the path is in the correct format for APIs

Types

type AnalysisCommentData

type AnalysisCommentData struct {
	FinalAnalysis *api.SecurityAnalysis
	ConsoleURL    string
}

AnalysisCommentData holds the data for the analysis comment template

type CommentResult

type CommentResult struct {
	Posted               bool
	IssuesFound          int
	InlineCommentsPosted int
	Message              string
}

CommentResult holds the result of posting a comment

Jump to

Keyboard shortcuts

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