Documentation
¶
Overview ¶
Package github provides the GitHub Actions plugin for TerraCi. It registers a pipeline generator and PR comment service.
Index ¶
- type Plugin
- func (p *Plugin) BuildInitConfig(state *initwiz.StateMap) *initwiz.InitContribution
- func (p *Plugin) CommitSHA() string
- func (p *Plugin) DetectEnv() bool
- func (p *Plugin) InitGroups() []*initwiz.InitGroupSpec
- func (p *Plugin) NewCommentService(_ *plugin.AppContext) ci.CommentService
- func (p *Plugin) NewGenerator(ctx *plugin.AppContext, ir *pipeline.IR) pipeline.Generator
- func (p *Plugin) PipelineID() string
- func (p *Plugin) Preflight(_ context.Context, _ *plugin.AppContext) error
- func (p *Plugin) ProviderName() string
- func (p *Plugin) SetAutoApprove(v bool)
- func (p *Plugin) SetPlanOnly(v bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin struct {
plugin.BasePlugin[*configpkg.Config]
}
Plugin is the GitHub Actions plugin.
func (*Plugin) BuildInitConfig ¶
func (p *Plugin) BuildInitConfig(state *initwiz.StateMap) *initwiz.InitContribution
BuildInitConfig builds the GitHub Actions init contribution.
func (*Plugin) InitGroups ¶ added in v0.7.5
func (p *Plugin) InitGroups() []*initwiz.InitGroupSpec
InitGroups returns the init wizard group specs for GitHub Actions.
func (*Plugin) NewCommentService ¶
func (p *Plugin) NewCommentService(_ *plugin.AppContext) ci.CommentService
NewCommentService creates a new PR comment service.
func (*Plugin) NewGenerator ¶
NewGenerator creates a new GitHub Actions pipeline generator bound to the pre-built IR.
func (*Plugin) PipelineID ¶ added in v0.7.4
PipelineID returns the GitHub Actions run ID.
func (*Plugin) Preflight ¶ added in v0.9.0
Preflight validates the loaded plugin config and detects PR context when running inside GitHub Actions. Validation runs before the env-detection branch so misshapen configs fail fast even on local generate runs.
func (*Plugin) ProviderName ¶
ProviderName returns the provider name.
func (*Plugin) SetAutoApprove ¶ added in v0.7.5
SetAutoApprove sets auto-approve mode directly on the typed config.
func (*Plugin) SetPlanOnly ¶ added in v0.7.5
SetPlanOnly sets plan-only mode directly on the typed config.