Documentation
¶
Overview ¶
Package github handles GitHub integration (workflows, PR annotations, issues).
Index ¶
- func BuildIssueCloseCommand(issueNumber string) []string
- func BuildIssueCreateCommand(title, body string, labels []string) []string
- func BuildIssueSearchCommand(unitPath string, labels []string) []string
- func BuildIssueUpdateCommand(issueNumber, body string) []string
- func BuildPRCommentCommand(prNumber, body string) []string
- func FormatGroupedIssueBody(records []domain.CertificationRecord, groupLabel string) string
- func FormatIssueBody(rec domain.CertificationRecord) string
- func FormatIssueTitle(rec domain.CertificationRecord) string
- func FormatPRComment(records []domain.CertificationRecord, enforcing bool) string
- func GenerateNightlyWorkflow() string
- func GeneratePRWorkflow() string
- func GenerateWeeklyWorkflow() string
- type TrustDelta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildIssueCloseCommand ¶
BuildIssueCloseCommand constructs a `gh issue close` command.
func BuildIssueCreateCommand ¶
BuildIssueCreateCommand constructs a `gh issue create` command.
func BuildIssueSearchCommand ¶
BuildIssueSearchCommand constructs a `gh issue list` command to find existing issues. Used for deduplication — search by label + title substring.
func BuildIssueUpdateCommand ¶
BuildIssueUpdateCommand constructs a `gh issue edit` command to update body.
func BuildPRCommentCommand ¶
BuildPRCommentCommand constructs a `gh pr comment` command.
func FormatGroupedIssueBody ¶
func FormatGroupedIssueBody(records []domain.CertificationRecord, groupLabel string) string
FormatGroupedIssueBody generates a single issue body for multiple related units.
func FormatIssueBody ¶
func FormatIssueBody(rec domain.CertificationRecord) string
FormatIssueBody generates a GitHub issue body from a certification record.
func FormatIssueTitle ¶
func FormatIssueTitle(rec domain.CertificationRecord) string
FormatIssueTitle generates a GitHub issue title for a decertified unit.
func FormatPRComment ¶
func FormatPRComment(records []domain.CertificationRecord, enforcing bool) string
FormatPRComment generates a Markdown PR comment from certification records.
func GenerateNightlyWorkflow ¶
func GenerateNightlyWorkflow() string
GenerateNightlyWorkflow returns the YAML for a nightly certification sweep.
func GeneratePRWorkflow ¶
func GeneratePRWorkflow() string
GeneratePRWorkflow returns the YAML for a PR certification workflow.
func GenerateWeeklyWorkflow ¶
func GenerateWeeklyWorkflow() string
GenerateWeeklyWorkflow returns the YAML for a weekly certification report.
Types ¶
type TrustDelta ¶
type TrustDelta struct {
NewlyCertified int
NewlyDecertified int
ScoreImproved int
ScoreDegraded int
AverageScoreDelta float64
}
TrustDelta computes the change in certification metrics between old and new records.
func ComputeTrustDelta ¶
func ComputeTrustDelta(oldRecords, newRecords []domain.CertificationRecord) TrustDelta
ComputeTrustDelta compares old vs new record sets.