Documentation
¶
Index ¶
Constants ¶
View Source
const ( // EvidenceID is the identifier for the PR/MR info material type EvidenceID = "CHAINLOOP_PR_INFO" // EvidenceSchemaURL is the URL to the JSON schema for PR/MR info EvidenceSchemaURL = "https://schemas.chainloop.dev/prinfo/1.0/pr-info.schema.json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct {
Platform string `json:"platform" jsonschema:"required,enum=github,enum=gitlab,description=The CI/CD platform"`
Type string `json:"type" jsonschema:"required,enum=pull_request,enum=merge_request,description=The type of change request"`
Number string `json:"number" jsonschema:"required,description=The PR/MR number or identifier"`
Title string `json:"title" jsonschema:"description=The PR/MR title"`
Description string `json:"description" jsonschema:"description=The PR/MR description or body"`
SourceBranch string `json:"source_branch" jsonschema:"description=The source branch name"`
TargetBranch string `json:"target_branch" jsonschema:"description=The target branch name"`
URL string `json:"url" jsonschema:"required,format=uri,description=Direct URL to the PR/MR"`
Author string `json:"author" jsonschema:"description=Username of the PR/MR author"`
}
Data represents the data payload of the PR/MR info evidence
type Evidence ¶
type Evidence struct {
ID string `json:"chainloop.material.evidence.id"`
Schema string `json:"schema"`
Data Data `json:"data"`
}
Evidence represents the complete evidence structure for PR/MR metadata
func NewEvidence ¶
NewEvidence creates a new Evidence instance
type Generator ¶
type Generator struct {
}
Generator handles the generation of JSON schemas for PR info.
func (*Generator) GeneratePRInfoSchema ¶
func (g *Generator) GeneratePRInfoSchema(version string) *jsonschema.Schema
GeneratePRInfoSchema generates a JSON schema for the PR/MR info data.
Click to show internal directories.
Click to hide internal directories.