-
Notifications
You must be signed in to change notification settings - Fork 329
[plan] Split checkout_manager.go into state management and step generation #23908
Copy link
Copy link
Closed
Closed
Copy link
Labels
Description
Objective
Split pkg/workflow/checkout_manager.go (1,005 lines) by moving all step generation functions to a new file, separating state management from YAML step generation.
Context
From discussion #23903 (Repository Quality: File Size Discipline). This file conflates CheckoutManager state management with GitHub Actions YAML step generation. The step generation functions are independently testable and have a natural seam for extraction.
Approach
- Create
pkg/workflow/checkout_step_generator.goin the same package (package workflow) - Move these functions to the new file:
GenerateCheckoutAppTokenStepsGenerateCheckoutAppTokenInvalidationStepsGenerateAdditionalCheckoutStepsGenerateGitHubFolderCheckoutStepGenerateDefaultCheckoutStepgenerateCheckoutStepLines
- Keep
CheckoutManagertype definition,NewCheckoutManager, all getters/setters, and resolver logic incheckout_manager.go
Rules
- Same package (
package workflow) - Do NOT change any function signatures
- Run
make fmtafter changes - Run
go test ./pkg/workflow/ -run ".*[Cc]heckout.*"to validate - Run
make agent-finishbefore committing
Acceptance Criteria
-
pkg/workflow/checkout_step_generator.gocontains allGenerate*/generate*step functions -
pkg/workflow/checkout_manager.goreduced to type definition + state management — under 400 lines - Both files under 500 lines
- All existing checkout-related tests pass
Generated by Plan Command for issue #discussion #23903 · ◷
- expires on Apr 3, 2026, 2:40 PM UTC
Reactions are currently unavailable
Metadata
Metadata
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.