[PR #990] [MERGED] refactor: default empty if: statement to if: success() in evaluator & remove FixIfStatement() #1716

Closed
opened 2026-03-01 21:52:22 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/990
Author: @ZauberNerd
Created: 2/10/2022
Status: Merged
Merged: 2/15/2022
Merged by: @mergify[bot]

Base: masterHead: default-success-exprparser


📝 Commits (3)

  • 4b846c1 refactor: default empty if: statement to if: success() in evaluator
  • 209028d refactor: remove obsolete FixIfStatement functions
  • cbf507b Merge branch 'master' into default-success-exprparser

📊 Changes

3 files changed (+3 additions, -54 deletions)

View changed files

📝 pkg/exprparser/interpreter.go (+3 -0)
📝 pkg/model/action.go (+0 -7)
📝 pkg/model/planner.go (+0 -47)

📄 Description

Previously the code to default an empty if: statement in the yaml file
was implemented in different files in the model package.
Now an empty if: statement defaults to success() in the expression
evaluator.

The introduction of the expression evaluator seems to have made the
FixIfStatement functions obsolete, as the test case
TestRunEvent/issue-598 works even without these functions.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nektos/act/pull/990 **Author:** [@ZauberNerd](https://github.com/ZauberNerd) **Created:** 2/10/2022 **Status:** ✅ Merged **Merged:** 2/15/2022 **Merged by:** [@mergify[bot]](https://github.com/apps/mergify) **Base:** `master` ← **Head:** `default-success-exprparser` --- ### 📝 Commits (3) - [`4b846c1`](https://github.com/nektos/act/commit/4b846c121e9270f17a9720364c7c973b1210e92b) refactor: default empty `if:` statement to `if: success()` in evaluator - [`209028d`](https://github.com/nektos/act/commit/209028d3e3b459aea5b488a139be88c67ab0937f) refactor: remove obsolete `FixIfStatement` functions - [`cbf507b`](https://github.com/nektos/act/commit/cbf507b65c0dff73873eaee8bb44a96e83ae5bd4) Merge branch 'master' into default-success-exprparser ### 📊 Changes **3 files changed** (+3 additions, -54 deletions) <details> <summary>View changed files</summary> 📝 `pkg/exprparser/interpreter.go` (+3 -0) 📝 `pkg/model/action.go` (+0 -7) 📝 `pkg/model/planner.go` (+0 -47) </details> ### 📄 Description Previously the code to default an empty `if:` statement in the yaml file was implemented in different files in the model package. Now an empty `if:` statement defaults to `success()` in the expression evaluator. The introduction of the expression evaluator seems to have made the `FixIfStatement` functions obsolete, as the test case `TestRunEvent/issue-598` works even without these functions. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:52:22 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#1716
No description provided.