[PR #1068] [MERGED] Fix: tojson(null) == 'null' #1753

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

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/1068
Author: @ChristopherHX
Created: 3/21/2022
Status: Merged
Merged: 3/22/2022
Merged by: @mergify[bot]

Base: masterHead: christopherhx/fix/tojson


📝 Commits (3)

📊 Changes

2 files changed (+2 additions, -1 deletions)

View changed files

📝 pkg/exprparser/functions.go (+1 -1)
📝 pkg/exprparser/functions_test.go (+1 -0)

📄 Description

You can test this with https://github.com/ChristopherHX/runner.server against actions/runner or online

on: push
jobs:
  testf:
    if: tojson(fromjson('[null]')[0]) == 'null'
    runs-on: ubuntu-latest
    steps:
    - run: echo ${{github.workspace}}

I expect this job to be executed


🔄 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/1068 **Author:** [@ChristopherHX](https://github.com/ChristopherHX) **Created:** 3/21/2022 **Status:** ✅ Merged **Merged:** 3/22/2022 **Merged by:** [@mergify[bot]](https://github.com/apps/mergify) **Base:** `master` ← **Head:** `christopherhx/fix/tojson` --- ### 📝 Commits (3) - [`5186eb3`](https://github.com/nektos/act/commit/5186eb35c92dc5de89d8e679825634c86445cd03) Fix: tojson(null) == 'null' - [`5ba93dd`](https://github.com/nektos/act/commit/5ba93dd104ca319a9ff85421326926c764d68c49) Update test - [`4830441`](https://github.com/nektos/act/commit/48304418c0868b769af2df4075cc5e66dfe42bb5) Update functions_test.go ### 📊 Changes **2 files changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `pkg/exprparser/functions.go` (+1 -1) 📝 `pkg/exprparser/functions_test.go` (+1 -0) </details> ### 📄 Description You can test this with https://github.com/ChristopherHX/runner.server against actions/runner or online ```yaml on: push jobs: testf: if: tojson(fromjson('[null]')[0]) == 'null' runs-on: ubuntu-latest steps: - run: echo ${{github.workspace}} ``` I expect this job to be executed --- <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:32 +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#1753
No description provided.