Skip to content

Error: Unhandled error: SyntaxError: Invalid or unexpected token #123

@yi-Xu-0100

Description

@yi-Xu-0100

Describe the bug

Error: Unhandled error: SyntaxError: Invalid or unexpected token

To Reproduce

Run actions/github-script@v3.1.0
  with:
    script: await github.pulls.create({
    owner: context.repo.owner,
    repo: context.repo.repo,
    head: prepare-release,
    base: main,
    title: 'chore(release): :bookmark: release v1.0.4',
    body: '
  ### Bug Fixes
  
  - **actions:** 🐛 fix not found branch ([25b4e19](https://github.com/yi-Xu-0100/test/commit/25b4e1926a26dca753a2b6bb8627881f47941428))
  - fix push error ([62458bf](https://github.com/yi-Xu-0100/test/commit/62458bf2fede7fe842cd9176cec6920a339469d8))',
    maintainer_can_modify: true,
  })
  
    github-token: ***
    debug: false
    user-agent: actions/github-script
    result-encoding: json
  env:
    BASE_BRANCH: main
    HEAD_BRANCH: prepare-release
SyntaxError: Invalid or unexpected token
    at new AsyncFunction (<anonymous>)
    at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v3.1.0/dist/index.js:5368:56)
Error: Unhandled error: SyntaxError: Invalid or unexpected token
    at main (/home/runner/work/_actions/actions/github-script/v3.1.0/dist/index.js:5394:26)
    at Module.720 (/home/runner/work/_actions/actions/github-script/v3.1.0/dist/index.js:5378:1)
    at __webpack_require__ (/home/runner/work/_actions/actions/github-script/v3.1.0/dist/index.js:24:31)
    at startup (/home/runner/work/_actions/actions/github-script/v3.1.0/dist/index.js:43:19)
    at /home/runner/work/_actions/actions/github-script/v3.1.0/dist/index.js:49:18
    at Object.<anonymous> (/home/runner/work/_actions/actions/github-script/v3.1.0/dist/index.js:52:10)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)

https://github.com/yi-Xu-0100/test/runs/2104771640

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions