qa

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: EUPL-1.2 Imports: 16 Imported by: 0

Documentation

Overview

cmd_docblock.go implements docblock/docstring coverage checking for Go code.

Usage:

core qa docblock              # Check current directory
core qa docblock ./pkg/...    # Check specific packages
core qa docblock --threshold=80  # Require 80% coverage

Package qa provides quality assurance workflow commands.

Unlike `core dev` which is about doing work (commit, push, pull), `core qa` is about verifying work (CI status, reviews, issues).

Commands:

  • watch: Monitor GitHub Actions after a push, report actionable data
  • review: PR review status with actionable next steps
  • health: Aggregate CI health across all repos
  • issues: Intelligent issue triage

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddQACommands

func AddQACommands(root *cli.Command)

AddQACommands registers the 'qa' command and all subcommands.

func RunDocblockCheck

func RunDocblockCheck(paths []string, threshold float64, verbose, jsonOutput bool) error

RunDocblockCheck checks docblock coverage for the given packages.

Types

type Author

type Author struct {
	Login string `json:"login"`
}

Author represents a GitHub user

type DocblockResult

type DocblockResult struct {
	Coverage   float64           `json:"coverage"`
	Threshold  float64           `json:"threshold"`
	Total      int               `json:"total"`
	Documented int               `json:"documented"`
	Missing    []MissingDocblock `json:"missing,omitempty"`
	Passed     bool              `json:"passed"`
}

DocblockResult holds the result of a docblock coverage check.

func CheckDocblockCoverage

func CheckDocblockCoverage(patterns []string) (*DocblockResult, error)

CheckDocblockCoverage analyzes Go packages for docblock coverage.

type HealthWorkflowRun

type HealthWorkflowRun struct {
	Status     string `json:"status"`
	Conclusion string `json:"conclusion"`
	Name       string `json:"name"`
	HeadSha    string `json:"headSha"`
	UpdatedAt  string `json:"updatedAt"`
	URL        string `json:"url"`
}

HealthWorkflowRun represents a GitHub Actions workflow run

type Issue

type Issue struct {
	Number    int       `json:"number"`
	Title     string    `json:"title"`
	State     string    `json:"state"`
	Body      string    `json:"body"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
	Author    struct {
		Login string `json:"login"`
	} `json:"author"`
	Assignees struct {
		Nodes []struct {
			Login string `json:"login"`
		} `json:"nodes"`
	} `json:"assignees"`
	Labels struct {
		Nodes []struct {
			Name string `json:"name"`
		} `json:"nodes"`
	} `json:"labels"`
	Comments struct {
		TotalCount int `json:"totalCount"`
		Nodes      []struct {
			Author struct {
				Login string `json:"login"`
			} `json:"author"`
			CreatedAt time.Time `json:"createdAt"`
		} `json:"nodes"`
	} `json:"comments"`
	URL string `json:"url"`

	// Computed fields
	RepoName   string
	Priority   int    // Lower = higher priority
	Category   string // "needs_response", "ready", "blocked", "triage"
	ActionHint string
}

Issue represents a GitHub issue with triage metadata

type JobStep

type JobStep struct {
	Name       string `json:"name"`
	Status     string `json:"status"`
	Conclusion string `json:"conclusion"`
	Number     int    `json:"number"`
}

JobStep represents a step within a job

type MissingDocblock

type MissingDocblock struct {
	File   string `json:"file"`
	Line   int    `json:"line"`
	Name   string `json:"name"`
	Kind   string `json:"kind"` // func, type, const, var
	Reason string `json:"reason,omitempty"`
}

MissingDocblock represents an exported symbol without documentation.

type PullRequest

type PullRequest struct {
	Number         int                `json:"number"`
	Title          string             `json:"title"`
	Author         Author             `json:"author"`
	State          string             `json:"state"`
	IsDraft        bool               `json:"isDraft"`
	Mergeable      string             `json:"mergeable"`
	ReviewDecision string             `json:"reviewDecision"`
	URL            string             `json:"url"`
	HeadRefName    string             `json:"headRefName"`
	CreatedAt      time.Time          `json:"createdAt"`
	UpdatedAt      time.Time          `json:"updatedAt"`
	Additions      int                `json:"additions"`
	Deletions      int                `json:"deletions"`
	ChangedFiles   int                `json:"changedFiles"`
	StatusChecks   *StatusCheckRollup `json:"statusCheckRollup"`
	ReviewRequests ReviewRequests     `json:"reviewRequests"`
	Reviews        []Review           `json:"reviews"`
}

PullRequest represents a GitHub pull request

type RepoHealth

type RepoHealth struct {
	Name         string
	Status       string // "passing", "failing", "pending", "no_ci", "disabled"
	Message      string
	URL          string
	FailingSince string
}

RepoHealth represents the CI health of a single repo

type Review

type Review struct {
	Author Author `json:"author"`
	State  string `json:"state"`
}

Review represents a PR review

type ReviewRequest

type ReviewRequest struct {
	RequestedReviewer Author `json:"requestedReviewer"`
}

ReviewRequest represents a review request

type ReviewRequests

type ReviewRequests struct {
	Nodes []ReviewRequest `json:"nodes"`
}

ReviewRequests contains pending review requests

type StatusCheckRollup

type StatusCheckRollup struct {
	Contexts []StatusContext `json:"contexts"`
}

StatusCheckRollup contains CI check status

type StatusContext

type StatusContext struct {
	State      string `json:"state"`
	Conclusion string `json:"conclusion"`
	Name       string `json:"name"`
}

StatusContext represents a single check

type WorkflowJob

type WorkflowJob struct {
	ID         int64  `json:"databaseId"`
	Name       string `json:"name"`
	Status     string `json:"status"`
	Conclusion string `json:"conclusion"`
	URL        string `json:"url"`
}

WorkflowJob represents a job within a workflow run

type WorkflowRun

type WorkflowRun struct {
	ID           int64     `json:"databaseId"`
	Name         string    `json:"name"`
	DisplayTitle string    `json:"displayTitle"`
	Status       string    `json:"status"`
	Conclusion   string    `json:"conclusion"`
	HeadSha      string    `json:"headSha"`
	URL          string    `json:"url"`
	CreatedAt    time.Time `json:"createdAt"`
	UpdatedAt    time.Time `json:"updatedAt"`
}

WorkflowRun represents a GitHub Actions workflow run

Jump to

Keyboard shortcuts

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