Documentation ¶
Index ¶
Constants ¶
View Source
const (
// > Overall trust: 76%
OverallTrustFormat = "%s\n%s:<TAB>%s\n"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Factor ¶
type Factor struct { // The raw value of this factor. Value float64 // The % of trust given to the value, compared // to global references. TrustPercent float64 }
Factor represents one of the trust factors used to compte the trust score for a repository.
type FactorName ¶
type FactorName string
FactorName is a typed string representing a Factor's name.
const ( PrivateContributionFactor FactorName = "Private contributions" ContributionScoreFactor FactorName = "Weighted contributions" IssueContributionFactor FactorName = "Created issues" CommitContributionFactor FactorName = "Commits authored" RepoContributionFactor FactorName = "Repositories" PRContributionFactor FactorName = "Pull requests" PRReviewContributionFactor FactorName = "Code reviews" AccountAgeFactor FactorName = "Account age (days)" Overall FactorName = "Overall trust" )
All of the factors taken into account by Astronomer and shown in the report.
type Percentile ¶
type Percentile string
Percentile is a typed string representing a percentile trust factor. It is a string instead of a float to allow the `encoding/json` package to marshal trust reports.
type Report ¶
type Report struct { Factors map[FactorName]Factor Percentiles map[Percentile]Factor }
Report represents the result of the trust computation of a repository's stargazers. It contains every trust factor that has been computed.
Click to show internal directories.
Click to hide internal directories.