[GH-ISSUE #188] ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined #127

Closed
opened 2026-03-01 21:40:27 +03:00 by kerem · 7 comments
Owner

Originally created by @znz on GitHub (Apr 7, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/188

I try act on https://github.com/ruby/ruby and https://github.com/rurema/doctree .
But act causes errors.

On doctree:

$ act 
ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined 
ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined 

On ruby:

$ act 
ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined 
[Pull Request/check_branch] 🚀  Start image=node:12.6-buster-slim
ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined 
ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined 
ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined 
ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined 
ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined 
ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined 
ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined 
ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined 
ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined 
ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined 
ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined 
ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined 
ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined 
[Pull Request/check_branch]   🐳  docker run image=node:12.6-buster-slim entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Pull Request/check_branch] ⭐  Run Check if branch is master
| Only master branch accepts a pull request, but it's ''.
[Pull Request/check_branch]   ❌  Failure - Check if branch is master
Error: exit with `FAILURE`: 1
Originally created by @znz on GitHub (Apr 7, 2020). Original GitHub issue: https://github.com/nektos/act/issues/188 I try `act` on https://github.com/ruby/ruby and https://github.com/rurema/doctree . But `act` causes errors. On doctree: ``` $ act ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined ``` On ruby: ``` $ act ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined [Pull Request/check_branch] 🚀 Start image=node:12.6-buster-slim ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined ERRO[0000] Error evaluating expression 'Boolean(!contains(github.event.head_commit.message, '[ci skip]'))' - TypeError: Cannot access member 'message' of undefined [Pull Request/check_branch] 🐳 docker run image=node:12.6-buster-slim entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [Pull Request/check_branch] ⭐ Run Check if branch is master | Only master branch accepts a pull request, but it's ''. [Pull Request/check_branch] ❌ Failure - Check if branch is master Error: exit with `FAILURE`: 1 ```
kerem 2026-03-01 21:40:27 +03:00
Author
Owner

@cplee commented on GitHub (Apr 16, 2020):

@znz - act uses an empty JSON object for the event by default...but you can create your own and pass in via act -e path-to-your-event.json

<!-- gh-comment-id:614943442 --> @cplee commented on GitHub (Apr 16, 2020): @znz - act uses an empty JSON object for the event by default...but you can create your own and pass in via `act -e path-to-your-event.json`
Author
Owner

@chrispcode commented on GitHub (May 16, 2020):

How?

<!-- gh-comment-id:629624200 --> @chrispcode commented on GitHub (May 16, 2020): How?
Author
Owner

@github-actions[bot] commented on GitHub (Jul 16, 2020):

Issue is stale and will be closed in 7 days unless there is new activity

<!-- gh-comment-id:659081167 --> @github-actions[bot] commented on GitHub (Jul 16, 2020): Issue is stale and will be closed in 7 days unless there is new activity
Author
Owner

@github-actions[bot] commented on GitHub (Sep 15, 2020):

Issue is stale and will be closed in 7 days unless there is new activity

<!-- gh-comment-id:692387260 --> @github-actions[bot] commented on GitHub (Sep 15, 2020): Issue is stale and will be closed in 7 days unless there is new activity
Author
Owner

@brunowego commented on GitHub (Aug 23, 2021):

@cplee I'm a little lost, if you can help me, I appreciate it. I try something like this, but without success:

name: Run Python Tests

on: ['pull_request', 'push']

jobs:
  skip:
    if: "contains(github['event']['head_commit']['message'], '[skip ci]')"

    runs-on: ubuntu-latest
    steps:
    - name: Skip CI 🚫
      run: echo Skip CI
act \
  -W ./.github/workflows/ci.yaml \
  -e <(cat << EOF
{
  "event": {
    "head_commit": {
      "message": "[skip ci] my awesome contribution"
    }
  }
}
EOF  
) \
  -v

What is the correct schema for this?

<!-- gh-comment-id:904124596 --> @brunowego commented on GitHub (Aug 23, 2021): @cplee I'm a little lost, if you can help me, I appreciate it. I try something like this, but without success: ```yaml name: Run Python Tests on: ['pull_request', 'push'] jobs: skip: if: "contains(github['event']['head_commit']['message'], '[skip ci]')" runs-on: ubuntu-latest steps: - name: Skip CI 🚫 run: echo Skip CI ``` ```sh act \ -W ./.github/workflows/ci.yaml \ -e <(cat << EOF { "event": { "head_commit": { "message": "[skip ci] my awesome contribution" } } } EOF ) \ -v ``` What is the correct schema for this?
Author
Owner

@ChristopherHX commented on GitHub (Aug 23, 2021):

What is the correct schema for this?

Should be

act \
  -W ./.github/workflows/ci.yaml \
  -e <(cat << EOF
{
  "head_commit": {
    "message": "[skip ci] my awesome contribution"
  }
}
EOF  
) \
  -v

Docs: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push

This is only up to 99% the correct schema, because github actions removes some webhook fields from the event payload.

On github your job will be skipped, because [skip ci] in a commit message will stop any jobs to run. (this is a feature which cannot be disabled on github.com)

<!-- gh-comment-id:904169001 --> @ChristopherHX commented on GitHub (Aug 23, 2021): > What is the correct schema for this? Should be ```bash act \ -W ./.github/workflows/ci.yaml \ -e <(cat << EOF { "head_commit": { "message": "[skip ci] my awesome contribution" } } EOF ) \ -v ``` Docs: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push This is only up to 99% the correct schema, because github actions removes some webhook fields from the event payload. On github your job will be skipped, because `[skip ci]` in a commit message will stop any jobs to run. (this is a feature which cannot be disabled on github.com)
Author
Owner

@brunowego commented on GitHub (Aug 23, 2021):

Thanks a lot @ChristopherHX. You saved my day!

<!-- gh-comment-id:904209397 --> @brunowego commented on GitHub (Aug 23, 2021): Thanks a lot @ChristopherHX. You saved my day!
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#127
No description provided.