Skip to content

[Code Quality] Complete migration from deprecated ApplyActionPinToStep to typed alternative #12260

@github-actions

Description

@github-actions

Description

Complete the migration from deprecated ApplyActionPinToStep() to the type-safe ApplyActionPinToTypedStep() alternative. The deprecated function is marked for removal and uses map[string]any with type assertions, while the typed alternative provides compile-time safety.

Current State

The codebase has deprecated functions still in use:

  • ApplyActionPinToStep() at pkg/workflow/action_pins.go:306
  • ApplyActionPinsToSteps() at pkg/workflow/action_pins.go:402-412

Both functions are marked deprecated but still have active call sites that need migration.

Suggested Changes

  1. Identify all call sites using deprecated functions
  2. Migrate to typed alternatives:
    • ApplyActionPinToStep()ApplyActionPinToTypedStep()
    • ApplyActionPinsToSteps()ApplyActionPinsToTypedSteps()
  3. Remove deprecated functions after migration is complete
  4. Update tests to use typed alternatives

Files Affected

  • Primary: pkg/workflow/action_pins.go (lines 306-412)
  • Call sites: Search codebase for usages with grep -r "ApplyActionPinToStep" pkg/

Success Criteria

  • ✅ Zero usages of deprecated ApplyActionPinToStep() function
  • ✅ Zero usages of deprecated ApplyActionPinsToSteps() function
  • ✅ Deprecated functions removed from codebase
  • ✅ All existing tests pass with typed alternatives
  • ✅ No new type assertion failures introduced

Benefits

  • Compile-time safety: Eliminates runtime type assertion failures
  • Code clarity: Typed function signatures are self-documenting
  • Reduced technical debt: Removes deprecated code path
  • Maintainability: Easier refactoring with strong types

Source

Extracted from Typist Analysis discussion #12238 - "Priority 1: Critical - Complete Typed Step Migration" section.

The discussion notes: "Code already exists with better types, function is marked deprecated, migration path is clear, will reduce type assertion failures."

Priority

High - Quick win (2-3 days effort), eliminates deprecated code, improves type safety

AI generated by Discussion Task Miner - Code Quality Improvement Agent

  • expires on Feb 11, 2026, 1:22 PM UTC

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions