Documentation
¶
Index ¶
- Constants
- func ComposeComment(plans []ci.ModulePlan, reports []*ci.Report, commitSHA, pipelineID string, ...) string
- func EnrichPlans(plans []ci.ModulePlan, modules []ci.ModuleReport)
- func FormatCostCell(p *ci.ModulePlan) string
- func FormatCostDiff(diff float64) string
- func FormatMonthlyCost(cost float64) string
- func Truncate(s string, maxLen int) string
- type Config
Constants ¶
View Source
const CommentMarker = ci.CommentMarker
CommentMarker is used to identify terraci comments for updates
Variables ¶
This section is empty.
Functions ¶
func ComposeComment ¶ added in v0.7.4
func ComposeComment(plans []ci.ModulePlan, reports []*ci.Report, commitSHA, pipelineID string, generatedAt time.Time) string
ComposeComment builds the final markdown comment from plans and plugin reports.
func EnrichPlans ¶ added in v0.7.4
func EnrichPlans(plans []ci.ModulePlan, modules []ci.ModuleReport)
EnrichPlans applies per-module data from report modules to plan data.
func FormatCostCell ¶
func FormatCostCell(p *ci.ModulePlan) string
FormatCostCell formats the cost cell for a module plan
func FormatCostDiff ¶
FormatCostDiff formats a cost difference with sign
func FormatMonthlyCost ¶
FormatMonthlyCost formats a monthly cost value
Types ¶
type Config ¶ added in v0.7.5
type Config struct {
Enabled *bool `yaml:"enabled,omitempty" json:"enabled,omitempty"`
OnChangesOnly bool `yaml:"on_changes_only,omitempty" json:"on_changes_only,omitempty"`
IncludeDetails bool `yaml:"include_details,omitempty" json:"include_details,omitempty"`
Labels []string `yaml:"labels,omitempty" json:"labels,omitempty"`
}
Config holds summary plugin settings.
Click to show internal directories.
Click to hide internal directories.