Skip to content

[plan] Add OutputName semantic type for GitHub Actions output name constants #17890

@github-actions

Description

@github-actions

Objective

Introduce an OutputName semantic type in pkg/constants and apply it to the 10 untyped output name constants, providing compile-time protection against accidentally mixing output names with arbitrary strings.

Context

Discussion #17885 (Typist - Go Type Consistency Analysis) identified 10 untyped string constants for GitHub Actions output names that follow the same pattern as already-typed StepID and JobName constants in the same file.

Location

File: pkg/constants/constants.go (around lines 682–691)

// Current — untyped strings
const IsTeamMemberOutput = "is_team_member"
const StopTimeOkOutput = "stop_time_ok"
const SkipCheckOkOutput = "skip_check_ok"
const SkipNoMatchCheckOkOutput = "skip_no_match_check_ok"
const CommandPositionOkOutput = "command_position_ok"
const MatchedCommandOutput = "matched_command"
const RateLimitOkOutput = "rate_limit_ok"
const SkipRolesOkOutput = "skip_roles_ok"
const SkipBotsOkOutput = "skip_bots_ok"
const ActivatedOutput = "activated"

// Proposed — typed
type OutputName string

func (o OutputName) String() string { return string(o) }

const IsTeamMemberOutput OutputName = "is_team_member"
// ... etc

Approach

  1. Add type OutputName string with String() and IsValid() methods (consistent with other semantic types in pkg/constants) in pkg/constants/constants.go
  2. Apply the type to all 10 output name constants
  3. Update the ~19 usage sites in pkg/workflow and pkg/cli to use string(constant) or .String() where plain string is needed, or update function signatures to accept OutputName where appropriate

Files to Modify

  • pkg/constants/constants.go — add OutputName type, apply to 10 constants
  • pkg/workflow/*.go — update ~19 usage sites
  • pkg/cli/*.go — update any usage sites

Acceptance Criteria

  • type OutputName string defined with String() and IsValid() methods
  • All 10 output name constants use the OutputName type
  • All usage sites compile correctly
  • make build and make test-unit pass
  • make fmt and make lint pass

Generated by Plan Command for issue #discussion #17885

  • expires on Feb 25, 2026, 11:40 AM UTC

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions