Documentation
¶
Index ¶
- type Comment
- type Coverage
- type Dossier
- type DossierSectionMetadata
- type DossierThread
- type ExtractSeedsOptions
- type FacetCoverage
- type Freshness
- type FreshnessStatus
- type Page
- type PageInfo
- type PullRequestDetails
- type RepoRef
- type Repository
- type SearchQuery
- type SearchResult
- type SearchResultItem
- type Seed
- type SeedEvidence
- type SeedSourceClass
- type SourceRef
- type Thread
- type ThreadKind
- type ThreadState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Coverage ¶
type Coverage struct {
AsOf time.Time
Facets []FacetCoverage
}
Coverage is a product-owned model for corpus facet coverage and freshness.
type Dossier ¶
type Dossier struct {
Repo RepoRef
CommitSHA string
AsOf time.Time
SourceRefs []SourceRef
Coverage Coverage
Repository Repository
ContributionGuidance string
OpenIssueCount int
ClosedIssueCount int
OpenPullRequestCount int
MergedPullRequestCount int
ClosedUnmergedPullRequestCount int
RecentMergedPullRequests []DossierThread
RecentOpenPullRequests []DossierThread
RecentClosedUnmergedPullRequests []DossierThread
RecentIssues []DossierThread
}
Dossier is a bounded, source-backed repository context package.
type DossierSectionMetadata ¶
type DossierSectionMetadata struct {
RecentLimit int `json:"recent_limit"`
MergedPRCount int `json:"merged_pr_count"`
OpenPRCount int `json:"open_pr_count"`
ClosedUnmergedPRCount int `json:"closed_unmerged_pr_count"`
IssueCount int `json:"issue_count"`
SourceClasses []string `json:"source_classes"`
}
DossierSectionMetadata records the bounded sections used to create a dossier.
type DossierThread ¶
type DossierThread struct {
Number int
Title string
Author string
State ThreadState
Draft bool
CreatedAt time.Time
UpdatedAt time.Time
ClosedAt time.Time
MergedAt time.Time
Labels []string
}
DossierThread is a lightweight, deterministic view for dossier listings.
type ExtractSeedsOptions ¶
type ExtractSeedsOptions struct {
Classes []SeedSourceClass
Limit int
}
ExtractSeedsOptions selects the source classes and bounds the result set.
type FacetCoverage ¶
FacetCoverage describes the presence, completeness, and freshness of one facet.
type Freshness ¶
type Freshness struct {
Status FreshnessStatus
AsOf time.Time
}
Freshness records the observed time and status of a facet.
type FreshnessStatus ¶
type FreshnessStatus string
FreshnessStatus describes how current a facet is.
const ( Fresh FreshnessStatus = "fresh" Stale FreshnessStatus = "stale" Missing FreshnessStatus = "missing" )
type PullRequestDetails ¶
type PullRequestDetails struct {
HeadRef string
BaseRef string
HeadSHA string
BaseSHA string
Merged bool
MergedAt time.Time
MergeCommitSHA string
Additions int
Deletions int
ChangedFiles int
CIStatus string
}
PullRequestDetails contains PR-specific facets.
type Repository ¶
type Repository struct {
RepoRef
ID int64
Description string
Topics []string
Languages []string
License string
DefaultBranch string
CommitSHA string
Archived bool
Fork bool
Stars int
Watchers int
Forks int
OpenIssueCount int
ClosedIssueCount int
OpenPullRequestCount int
MergedPullRequestCount int
ClosedUnmergedPullRequestCount int
CreatedAt time.Time
UpdatedAt time.Time
}
Repository is a product-owned snapshot of repository metadata and counts.
type SearchQuery ¶
type SearchQuery struct {
Text string
Repo RepoRef
Kinds []ThreadKind
States []ThreadState
Labels []string
Sort string
Page Page
}
SearchQuery is a product-owned search request.
type SearchResult ¶
type SearchResult struct {
Items []SearchResultItem
Page PageInfo
Ref SourceRef
}
SearchResult is a product-owned search result page.
type SearchResultItem ¶
type SearchResultItem struct {
Repo RepoRef
Kind ThreadKind
Number int
Title string
Score float64
Ref SourceRef
}
SearchResultItem is one product-owned search result.
type Seed ¶
type Seed struct {
SourceClass SeedSourceClass
Number int
Title string
Author string
State string
Labels []string
CreatedAt time.Time
UpdatedAt time.Time
ClosedAt time.Time
MergedAt time.Time
Evidence SeedEvidence
}
Seed is an evidence-backed record derived from stored merged PRs, closed unmerged PRs, or issues.
type SeedEvidence ¶
type SeedEvidence struct {
TitleConvention string
IssueLinkages []string
ValidationIndicators []string
ApproximateScope string
ScopeEvidence string
RejectionOrSupersession string
ProblemAreas []string
}
SeedEvidence carries the observed patterns and extracted signals for a seed.
type SeedSourceClass ¶
type SeedSourceClass string
SeedSourceClass identifies the stored thread class a seed was extracted from.
const ( SeedSourceClassMergedPR SeedSourceClass = "merged_pr" SeedSourceClassClosedUnmergedPR SeedSourceClass = "closed_unmerged_pr" SeedSourceClassIssue SeedSourceClass = "issue" )
type SourceRef ¶
type SourceRef struct {
Source string
URL string
CommitSHA string
ObservedAt time.Time
AsOf time.Time
}
SourceRef records the exact source, reference, and observation time. It carries no vendor-specific metadata objects.
type Thread ¶
type Thread struct {
ID int64
Repo RepoRef
Kind ThreadKind
Number int
Title string
Body string
Author string
State ThreadState
Draft bool
Labels []string
Assignees []string
CreatedAt time.Time
UpdatedAt time.Time
ClosedAt time.Time
// PullRequest is present when Kind is PullRequestKind.
PullRequest *PullRequestDetails
}
Thread is a product-owned model for an issue or pull request. It carries no vendor-specific API types.
type ThreadKind ¶
type ThreadKind string
ThreadKind distinguishes issues from pull requests.
const ( IssueKind ThreadKind = "issue" PullRequestKind ThreadKind = "pull_request" )
type ThreadState ¶
type ThreadState string
ThreadState is the high-level lifecycle state of a thread.
const ( OpenState ThreadState = "open" ClosedState ThreadState = "closed" )