Documentation
¶
Index ¶
- Constants
- func ClearPlugins()
- func Detect() provider.Provider
- func DetectOrError() (provider.Provider, error)
- func Execute(opts ExecuteOptions) error
- func Get(name string) (provider.Provider, error)
- func GetPlugin(componentType string) (plugin.Plugin, bool)
- func GetPluginForEvent(event string) plugin.Plugin
- func IsCI() bool
- func List() []string
- func ListPlugins() []string
- func Register(p provider.Provider)
- func RegisterPlugin(p plugin.Plugin) error
- type BranchStatus
- type CheckStatus
- type CheckStatusState
- type ExecuteOptions
- type PRStatus
- type Provider
- type Status
- type StatusOptions
Constants ¶
const ( // CheckStatusStatePending indicates the check is pending or in progress. CheckStatusStatePending = provider.CheckStatusStatePending // CheckStatusStateSuccess indicates the check passed. CheckStatusStateSuccess = provider.CheckStatusStateSuccess // CheckStatusStateFailure indicates the check failed. CheckStatusStateFailure = provider.CheckStatusStateFailure // CheckStatusStateCancelled indicates the check was cancelled. CheckStatusStateCancelled = provider.CheckStatusStateCancelled // CheckStatusStateSkipped indicates the check was skipped. CheckStatusStateSkipped = provider.CheckStatusStateSkipped )
Variables ¶
This section is empty.
Functions ¶
func ClearPlugins ¶
func ClearPlugins()
ClearPlugins removes all registered plugins. This is primarily for testing.
func DetectOrError ¶
DetectOrError returns the detected provider or an error if none is detected.
func Execute ¶
func Execute(opts ExecuteOptions) error
Execute runs all CI actions for a hook event. Returns nil if not in CI or if the event is not handled.
func GetPluginForEvent ¶
GetPluginForEvent returns the plugin that handles a specific hook event. Returns nil if no plugin handles the event.
func Register ¶
Register registers a CI provider. Providers should call this in their init() function.
func RegisterPlugin ¶
RegisterPlugin registers a CI plugin for a component type. Plugins should call this in their init() function for self-registration.
Types ¶
type BranchStatus ¶
type BranchStatus = provider.BranchStatus
BranchStatus contains status information for a specific branch.
type CheckStatus ¶
type CheckStatus = provider.CheckStatus
CheckStatus contains status information for a single check.
type CheckStatusState ¶
type CheckStatusState = provider.CheckStatusState
CheckStatusState represents the simplified state for display.
type ExecuteOptions ¶
type ExecuteOptions struct {
// Event is the hook event (e.g., "after.terraform.plan").
Event string
// AtmosConfig is the Atmos configuration.
AtmosConfig *schema.AtmosConfiguration
// Info contains component and stack information.
Info *schema.ConfigAndStacksInfo
// Output is the command output to process.
Output string
// ComponentType overrides the component type detection.
// If empty, it's extracted from the event.
ComponentType string
// ForceCIMode forces CI mode even if environment detection fails.
// This is set when --ci flag is used.
ForceCIMode bool
// CommandError is the error from the command execution, if any.
// When set, check runs are updated with failure status.
CommandError error
}
ExecuteOptions contains options for executing CI hooks.
type StatusOptions ¶
type StatusOptions = provider.StatusOptions
StatusOptions contains options for fetching CI status.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
plugin
Package plugin defines the CI plugin interface and related types for component type abstractions.
|
Package plugin defines the CI plugin interface and related types for component type abstractions. |
|
provider
Package provider defines the CI/CD provider interface and related types.
|
Package provider defines the CI/CD provider interface and related types. |
|
plugins
|
|
|
terraform
Package terraform provides the CI provider implementation for Terraform.
|
Package terraform provides the CI provider implementation for Terraform. |
|
providers
|
|
|
generic
Package generic provides a fallback CI provider for when --ci flag is used but no specific CI platform is detected.
|
Package generic provides a fallback CI provider for when --ci flag is used but no specific CI platform is detected. |
|
github
Package github provides GitHub Actions CI provider implementation.
|
Package github provides GitHub Actions CI provider implementation. |
|
Package templates provides CI summary template loading and rendering.
|
Package templates provides CI summary template loading and rendering. |