[PR #792] [CLOSED] WIP: expr parser parity #1610

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

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/792
Author: @ChristopherHX
Created: 8/30/2021
Status: Closed

Base: masterHead: feature/expr-parser-parity


📝 Commits (7)

📊 Changes

2 files changed (+247 additions, -53 deletions)

View changed files

📝 pkg/runner/expression.go (+214 -44)
📝 pkg/runner/expression_test.go (+33 -9)

📄 Description

Currently the expression parser is a bit to far away from githubs one this breaks my github-act-runner program.
This PR will

  • reject some js only syntax.
  • format will throw js exceptions on errors
  • fromjson will parse non object types like arrays, numbers, strings
  • secrets will work in more complex expressions, with toUpperCase in brackets
  • allow to use the .*. syntax of github actions, will be rewritten via map

Resolves #718

Well might be really stale now


🔄 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/792 **Author:** [@ChristopherHX](https://github.com/ChristopherHX) **Created:** 8/30/2021 **Status:** ❌ Closed **Base:** `master` ← **Head:** `feature/expr-parser-parity` --- ### 📝 Commits (7) - [`7af5722`](https://github.com/nektos/act/commit/7af572215a1ce9b925640223ee5e86ab0ce128ae) Escape \ - [`9800da1`](https://github.com/nektos/act/commit/9800da16a738a5447afe0558ec474ee6111c7dad) Improve expression simulation - [`17ec68b`](https://github.com/nektos/act/commit/17ec68b13c0c033f7a928b56d1d55d55ce8252d4) Deny ?, : e.g. ternary op - [`013f60c`](https://github.com/nektos/act/commit/013f60cf807bd8d4efc6e7a44f2396d7dc767dfb) Fix impl - [`78c8ea5`](https://github.com/nektos/act/commit/78c8ea5c1676f5afc24c8ce4189e90eb6fdac012) More fixes + tests - [`68d9456`](https://github.com/nektos/act/commit/68d945644598b9e9fa7f272dc3b54365e632d772) Update expression.go - [`85880a8`](https://github.com/nektos/act/commit/85880a845e15573e88e163688ee9cfc07ad24f23) Merge branch 'master' into feature/expr-parser-parity ### 📊 Changes **2 files changed** (+247 additions, -53 deletions) <details> <summary>View changed files</summary> 📝 `pkg/runner/expression.go` (+214 -44) 📝 `pkg/runner/expression_test.go` (+33 -9) </details> ### 📄 Description Currently the expression parser is a bit to far away from githubs one [this breaks my github-act-runner program](https://github.com/ChristopherHX/github-act-runner). This PR will - reject some js only syntax. - format will throw js exceptions on errors - fromjson will parse non object types like arrays, numbers, strings - secrets will work in more complex expressions, with toUpperCase in brackets - allow to use the .*. syntax of github actions, will be rewritten via map Resolves #718 Well might be really stale now --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:51:54 +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#1610
No description provided.