Skip to content

[duplicate-code] Duplicate Code: Runtime Override Cloning in applyRuntimeOverrides #43132

Description

@github-actions

Summary

applyRuntimeOverrides clones Runtime twice with the same override flow when action-repo or action-version is present.

Locations

  • pkg/workflow/runtime_overrides.go:73-93
  • pkg/workflow/runtime_overrides.go:101-125

Impact

  • Future Runtime field changes must be updated in two places.
  • The branch-specific clone blocks increase drift risk when override behavior changes.

Recommendation

Extract a helper such as cloneRuntimeWithActionOverrides(base *Runtime, actionRepo, actionVersion string) *Runtime and reuse it in both branches.

Assignee: @copilot

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

Generated by 🔍 Duplicate Code Detector · 4.06 AIC · ⌖ 2.91 AIC · ⊞ 33.6K ·

  • expires on Jul 4, 2026, 10:27 PM UTC-08:00

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions