mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[PR #752] [MERGED] Fix format function {{, }} are escapes #1590
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#1590
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/nektos/act/pull/752
Author: @ChristopherHX
Created: 7/16/2021
Status: ✅ Merged
Merged: 8/9/2021
Merged by: @mergify[bot]
Base:
master← Head:fix/format-escapes📝 Commits (2)
222c4ddFix format function {{, }} are escapescd7ed35Update format function added 2 error checks📊 Changes
2 files changed (+38 additions, -6 deletions)
View changed files
📝
pkg/runner/expression.go(+30 -6)📝
pkg/runner/expression_test.go(+8 -0)📄 Description
Github transforms multiple expressions into one format expression while parsing and every non expression
{is replaced by{{and}by}}.I assume vmformat should mimic githubs behavior, issues appeard during testing of https://github.com/ChristopherHX/github-actions-act-runner.
Haven't searched any documentation about this yet.
Some corner cases fixed too
format('{0}', github.undefined_value)should be an empty string notundefined.format('{0}', '{1}', 'Hello')should be{1}notHello.How do I test the error handler?
vmFormat has no error output, so the tests cannot test for error messages or did I miss something?
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.