github

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package github handles GitHub integration (workflows, PR annotations, issues).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildIssueCloseCommand

func BuildIssueCloseCommand(issueNumber string) []string

BuildIssueCloseCommand constructs a `gh issue close` command.

func BuildIssueCreateCommand

func BuildIssueCreateCommand(title, body string, labels []string) []string

BuildIssueCreateCommand constructs a `gh issue create` command.

func BuildIssueSearchCommand

func BuildIssueSearchCommand(unitPath string, labels []string) []string

BuildIssueSearchCommand constructs a `gh issue list` command to find existing issues. Used for deduplication — search by label + title substring.

func BuildIssueUpdateCommand

func BuildIssueUpdateCommand(issueNumber, body string) []string

BuildIssueUpdateCommand constructs a `gh issue edit` command to update body.

func BuildPRCommentCommand

func BuildPRCommentCommand(prNumber, body string) []string

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.

Jump to

Keyboard shortcuts

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