Objective
Split pkg/workflow/compiler_safe_outputs_config.go (1,035 lines) into focused files by separating builder infrastructure from handler implementations.
Context
Discussion: #26221
This file generates the GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG env variable consumed by the JavaScript safe-outputs runner. It mixes builder infrastructure, individual handler config functions, and the top-level orchestrator.
Approach
- Move the
handlerConfigBuilder struct and all its methods to compiler_safe_outputs_builder.go
- Move individual handler config generator functions (issues, PRs, comments, discussions, etc.) to
compiler_safe_outputs_handlers.go
- Keep the top-level orchestrator and
GenerateSafeOutputsHandlerConfig in the original file
Files to Modify
- Split:
pkg/workflow/compiler_safe_outputs_config.go
- Create:
pkg/workflow/compiler_safe_outputs_builder.go
- Create:
pkg/workflow/compiler_safe_outputs_handlers.go
Acceptance Criteria
Generated by Plan Command for issue #discussion #26221 · ● 150.1K · ◷
Objective
Split
pkg/workflow/compiler_safe_outputs_config.go(1,035 lines) into focused files by separating builder infrastructure from handler implementations.Context
Discussion: #26221
This file generates the
GH_AW_SAFE_OUTPUTS_HANDLER_CONFIGenv variable consumed by the JavaScript safe-outputs runner. It mixes builder infrastructure, individual handler config functions, and the top-level orchestrator.Approach
handlerConfigBuilderstruct and all its methods tocompiler_safe_outputs_builder.gocompiler_safe_outputs_handlers.goGenerateSafeOutputsHandlerConfigin the original fileFiles to Modify
pkg/workflow/compiler_safe_outputs_config.gopkg/workflow/compiler_safe_outputs_builder.gopkg/workflow/compiler_safe_outputs_handlers.goAcceptance Criteria
compiler_safe_outputs_config.gois ≤ 300 linesmake build && make test-unitpass without errorsmake fmt && make lintpass without errors