Skip to content

feat: support case expression function#6102

Open
luboszk wants to merge 1 commit into
nektos:masterfrom
luboszk:feat/case-expression
Open

feat: support case expression function#6102
luboszk wants to merge 1 commit into
nektos:masterfrom
luboszk:feat/case-expression

Conversation

@luboszk
Copy link
Copy Markdown

@luboszk luboszk commented May 22, 2026

Summary

  • Implements the new GitHub Actions case expression function: case(pred1, val1, pred2, val2, ..., default) returns the value paired with the first truthy predicate, or the trailing default.
  • Registers case in the expression interpreter and in the YAML schema's function list (3..N args).

Closes #6006

Test plan

  • go test ./pkg/exprparser/... ./pkg/schema/... passes
  • Reproduce the workflow from Support case expression #6006 via act and confirm it no longer errors

Adds the `case(pred1, val1, ..., default)` function recently introduced
to GitHub Actions expressions, returning the value paired with the first
truthy predicate (or the trailing default).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support case expression

1 participant