Skip to content

[Code Quality] Implement dry-run mode for workflow updates #9957

@github-actions

Description

@github-actions

Description

The pkg/cli/update_command.go file contains a TODO for implementing dry-run mode for workflow updates (line 90). This feature would allow users to preview what changes would be made before actually updating workflows.

Suggested Changes

Implement dry-run functionality in the update command:

  1. Add dry-run logic to UpdateWorkflowsWithExtensionCheck() function
  2. When --dry-run is specified:
    • Detect which workflows would be updated
    • Show diff of proposed changes
    • Display update summary without making changes
  3. Add tests for dry-run behavior

Files Affected

  • pkg/cli/update_command.go (line 90 - remove TODO, implement feature)
  • pkg/cli/update_workflows.go (add dry-run support)
  • pkg/cli/update_command_test.go (add dry-run tests)

Success Criteria

  • gh aw update --dry-run shows proposed changes without modifying files
  • Output clearly indicates this is a dry-run (no actual changes)
  • All existing update tests pass
  • New tests verify dry-run behavior
  • Update help text documents the --dry-run flag

Source

TODO comment in pkg/cli/update_command.go:90:

// TODO: Implement dry-run mode for workflow updates
return fmt.Errorf("--dry-run mode not yet implemented for workflow updates")

Priority

Low - Nice-to-have feature for safer workflow updates

AI generated by Discussion Task Miner - Code Quality Improvement Agent

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions