Documentation
¶
Index ¶
- Variables
- func BuildRunnerMap(imageNames []string) map[string]string
- func CollectManualSetup(results []*ConversionResult) []string
- func CollectNeedsReview(results []*ConversionResult) []string
- func DeduplicateOutputNames(results []*ConversionResult)
- func DetectUnsupported(dir string) []string
- func HasValidationErrors(results []*ConversionResult) bool
- func LookupActionTransformer(uses string) (actionTransformer, bool)
- func MapBambooExpressions(s string) string
- func MapGHAExpressions(s string) string
- func OutputFileName(sourcePath string) string
- func SanitizeJobID(id string) string
- func SortedKeys[V any](m map[string]V) []string
- func ValidSource(s SourceCI) bool
- type CIConfig
- type ConversionResult
- type FilePublication
- type Job
- type MigrateOutput
- type Options
- type Pipeline
- type ResultStatus
- type SourceCI
- type Step
- type StepResult
Constants ¶
This section is empty.
Variables ¶
var RunnerMap = map[string]string{
"ubuntu-latest": "Linux-Large",
"ubuntu-24.04": "Linux-Large",
"ubuntu-22.04": "Linux-Large",
"ubuntu-20.04": "Linux-Large",
"macos-latest": "Mac-Medium",
"macos-15": "Mac-Medium",
"macos-14": "Mac-Medium",
"macos-13": "Mac-Medium",
"windows-latest": "Windows-Medium",
"windows-2022": "Windows-Medium",
"windows-2019": "Windows-Medium",
}
RunnerMap holds the default GHA-label → JetBrains-hosted-agent mapping per the 2026.2 schema enum; overridden by schema- or cloud-derived names when connected.
Functions ¶
func BuildRunnerMap ¶
BuildRunnerMap maps known CI runner labels to the best matching agent name; returns nil when no OS matches.
func CollectManualSetup ¶
func CollectManualSetup(results []*ConversionResult) []string
CollectManualSetup returns the deduplicated union of ManualSetup items across results, preserving first-seen order.
func CollectNeedsReview ¶
func CollectNeedsReview(results []*ConversionResult) []string
CollectNeedsReview returns the deduplicated union of NeedsReview items across results, preserving first-seen order.
func DeduplicateOutputNames ¶
func DeduplicateOutputNames(results []*ConversionResult)
func DetectUnsupported ¶
DetectUnsupported returns CI configurations present in the repository that migrate does not convert.
func HasValidationErrors ¶
func HasValidationErrors(results []*ConversionResult) bool
HasValidationErrors reports whether any result has a non-empty ValidationError.
func LookupActionTransformer ¶
func MapBambooExpressions ¶
MapBambooExpressions rewrites Bamboo `${bamboo.*}` references to TeamCity %param% syntax.
func MapGHAExpressions ¶
func OutputFileName ¶
func SanitizeJobID ¶
SanitizeJobID rewrites every run of characters outside [A-Za-z0-9_] to "_" so the result is a valid job key and dependency reference.
func SortedKeys ¶
func ValidSource ¶
Types ¶
type CIConfig ¶
type CIConfig struct {
Source SourceCI `json:"source"`
File string `json:"file"`
Jobs int `json:"jobs"`
Steps int `json:"steps"`
Features []string `json:"features"`
}
func AnalyzeFile ¶
AnalyzeFile reads a single path and returns its CIConfig, inferring the source from the path when not provided.
type ConversionResult ¶
type ConversionResult struct {
SourceFile string `json:"sourceFile"`
OutputFile string `json:"outputFile"`
Source SourceCI `json:"source"`
YAML string `json:"yaml"`
JobsConverted int `json:"jobsConverted"`
StepsConverted int `json:"stepsConverted"`
Simplified []string `json:"simplified"`
NeedsReview []string `json:"needsReview"`
ManualSetup []string `json:"manualSetup"`
ValidationError string `json:"validationError,omitempty"`
Pipeline *Pipeline `json:"-"`
}
func NewResult ¶
func NewResult(cfg CIConfig) *ConversionResult
type FilePublication ¶
type MigrateOutput ¶
type MigrateOutput struct {
Sources []CIConfig `json:"sources"`
Results []*ConversionResult `json:"results"`
}
type Pipeline ¶
type ResultStatus ¶
type ResultStatus int
const ( StatusConverted ResultStatus = iota StatusSimplified StatusUnsupported StatusUnknown )
type SourceCI ¶
type SourceCI string
func InferSource ¶
InferSource guesses a CI source from a path; returns "" when no heuristic matches.
type StepResult ¶
type StepResult struct {
Status ResultStatus
Steps []Step
Artifacts []FilePublication
EnableDependencyCache bool
Note string
ManualTasks []string
}
func Converted ¶
func Converted(steps []Step) StepResult