atlassian / gajira-create

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`SyntaxError: Unexpected identifier` when issue title includes backticks

srknzl opened this issue · comments

My issue title was

The error: `Cannot add property 0, object is not extensible` 

and the github action failed with the following error. The action workflow: https://github.com/hazelcast/github-jira-tool-action/blob/main/action.yml

Logs:

2022-03-21T13:02:41.3290932Z Requested labels: ubuntu-latest
2022-03-21T13:02:41.3290989Z Job defined at: hazelcast/hazelcast-nodejs-client/.github/workflows/jira.yml@refs/heads/master
2022-03-21T13:02:41.3291013Z Waiting for a runner to pick up this job...
2022-03-21T13:02:43.0715096Z Job is waiting for a hosted runner to come online.
2022-03-21T13:02:47.4926882Z Job is about to start running on the hosted runner: GitHub Actions 9 (hosted)
2022-03-21T13:02:51.5608716Z Current runner version: '2.288.1'
2022-03-21T13:02:51.5637011Z ##[group]Operating System
2022-03-21T13:02:51.5637566Z Ubuntu
2022-03-21T13:02:51.5637971Z 20.04.4
2022-03-21T13:02:51.5638278Z LTS
2022-03-21T13:02:51.5638595Z ##[endgroup]
2022-03-21T13:02:51.5638971Z ##[group]Virtual Environment
2022-03-21T13:02:51.5639408Z Environment: ubuntu-20.04
2022-03-21T13:02:51.5639775Z Version: 20220227.1
2022-03-21T13:02:51.5640345Z Included Software: https://github.com/actions/virtual-environments/blob/ubuntu20/20220227.1/images/linux/Ubuntu2004-Readme.md
2022-03-21T13:02:51.5641078Z Image Release: https://github.com/actions/virtual-environments/releases/tag/ubuntu20%2F20220227.1
2022-03-21T13:02:51.5641906Z ##[endgroup]
2022-03-21T13:02:51.5642300Z ##[group]Virtual Environment Provisioner
2022-03-21T13:02:51.5642657Z 1.0.0.0-main-20220307-1
2022-03-21T13:02:51.5643038Z ##[endgroup]
2022-03-21T13:02:51.5644125Z ##[group]GITHUB_TOKEN Permissions
2022-03-21T13:02:51.5644812Z Actions: write
2022-03-21T13:02:51.5645292Z Checks: write
2022-03-21T13:02:51.5645740Z Contents: write
2022-03-21T13:02:51.5646098Z Deployments: write
2022-03-21T13:02:51.5646470Z Discussions: write
2022-03-21T13:02:51.5646820Z Issues: write
2022-03-21T13:02:51.5647187Z Metadata: read
2022-03-21T13:02:51.5647540Z Packages: write
2022-03-21T13:02:51.5647947Z Pages: write
2022-03-21T13:02:51.5648244Z PullRequests: write
2022-03-21T13:02:51.5648641Z RepositoryProjects: write
2022-03-21T13:02:51.5649058Z SecurityEvents: write
2022-03-21T13:02:51.5649426Z Statuses: write
2022-03-21T13:02:51.5649782Z ##[endgroup]
2022-03-21T13:02:51.5653632Z Secret source: Actions
2022-03-21T13:02:51.5654269Z Prepare workflow directory
2022-03-21T13:02:51.6499946Z Prepare all required actions
2022-03-21T13:02:51.6688790Z Getting action download info
2022-03-21T13:02:51.9407589Z Download action repository 'hazelcast/github-jira-tool-action@v3' (SHA:b27e06f9994cf9d61018cb806751db43c98b8e10)
2022-03-21T13:02:52.5952908Z Getting action download info
2022-03-21T13:02:52.8182120Z Download action repository 'atlassian/gajira-login@v2.0.0' (SHA:90a599561baaf8c05b080645ed73db7391c246ed)
2022-03-21T13:02:53.2349451Z Download action repository 'atlassian/gajira-create@v2.0.1' (SHA:c0a9c69ac9d6aa063fed57201e55336ada860183)
2022-03-21T13:02:53.6881108Z Download action repository 'actions/github-script@v4.0.2' (SHA:a3e7071a34d7e1f219a8a4de9a5e0a34d1ee1293)
2022-03-21T13:02:54.3648653Z ##[group]Run hazelcast/github-jira-tool-action@v3
2022-03-21T13:02:54.3649029Z with:
2022-03-21T13:02:54.3649683Z   JIRA_BASE_URL: ***
2022-03-21T13:02:54.3649982Z   JIRA_USER_EMAIL: ***
2022-03-21T13:02:54.3650282Z   JIRA_API_TOKEN: ***
2022-03-21T13:02:54.3650536Z   TARGET_JIRA_PROJECT: API
2022-03-21T13:02:54.3650793Z   JIRA_LABEL: Node.js
2022-03-21T13:02:54.3651027Z   ISSUE_TYPE: Bug
2022-03-21T13:02:54.3651264Z ##[endgroup]
2022-03-21T13:02:54.3893971Z ##[group]Run atlassian/gajira-login@v2.0.0
2022-03-21T13:02:54.3894310Z env:
2022-03-21T13:02:54.3894788Z   JIRA_BASE_URL: ***
2022-03-21T13:02:54.3895075Z   JIRA_USER_EMAIL: ***
2022-03-21T13:02:54.3895388Z   JIRA_API_TOKEN: ***
2022-03-21T13:02:54.3895624Z ##[endgroup]
2022-03-21T13:02:55.2185956Z Logged in as: undefined
2022-03-21T13:02:55.2436760Z ##[group]Run atlassian/gajira-create@v2.0.1
2022-03-21T13:02:55.2437070Z with:
2022-03-21T13:02:55.2437296Z   project: API
2022-03-21T13:02:55.2437521Z   issuetype: Bug
2022-03-21T13:02:55.2437901Z   summary: The error: `Cannot add property 0, object is not extensible` [GH#1256]

2022-03-21T13:02:55.2438438Z   description: {panel}
*Created By:* srknzl
[Github permalink|https://github.com/hazelcast/hazelcast-nodejs-client/issues/1256]
{panel}

2022-03-21T13:02:55.2438857Z   fields: {"labels": ["Node.js"]}
2022-03-21T13:02:55.2439105Z ##[endgroup]
2022-03-21T13:02:56.8276143Z Created issue: API-1283
2022-03-21T13:02:56.8277859Z Saving API-1283 to /home/runner/.jira.d/config.yml
2022-03-21T13:02:56.8278496Z Saving API-1283 to /home/runner/jira/config.yml
2022-03-21T13:02:56.8431600Z ##[group]Run actions/github-script@v4.0.2
2022-03-21T13:02:56.8432035Z with:
2022-03-21T13:02:56.8432562Z   script: const newTitle = `The error: `Cannot add property 0, object is not extensible` [API-1283]`
github.issues.update({
  issue_number: context.issue.number,
  owner: context.repo.owner,
  repo: context.repo.repo,
  title: newTitle
})

2022-03-21T13:02:56.8433293Z   github-token: ***
2022-03-21T13:02:56.8433533Z   debug: false
2022-03-21T13:02:56.8433789Z   user-agent: actions/github-script
2022-03-21T13:02:56.8434066Z   result-encoding: json
2022-03-21T13:02:56.8434300Z ##[endgroup]
2022-03-21T13:02:56.9103121Z SyntaxError: Unexpected identifier
2022-03-21T13:02:56.9103984Z     at new AsyncFunction (<anonymous>)
2022-03-21T13:02:56.9105310Z     at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v4.0.2/dist/index.js:2451:56)
2022-03-21T13:02:56.9106123Z     at main (/home/runner/work/_actions/actions/github-script/v4.0.2/dist/index.js:2505:26)
2022-03-21T13:02:56.9107464Z     at Module.272 (/home/runner/work/_actions/actions/github-script/v4.0.2/dist/index.js:2489:1)
2022-03-21T13:02:56.9134540Z ##[error]Unhandled error: SyntaxError: Unexpected identifier
2022-03-21T13:02:56.9147823Z     at __webpack_require__ (/home/runner/work/_actions/actions/github-script/v4.0.2/dist/index.js:24:31)
2022-03-21T13:02:56.9148446Z     at startup (/home/runner/work/_actions/actions/github-script/v4.0.2/dist/index.js:43:19)
2022-03-21T13:02:56.9148959Z     at /home/runner/work/_actions/actions/github-script/v4.0.2/dist/index.js:49:18
2022-03-21T13:02:56.9149521Z     at Object.<anonymous> (/home/runner/work/_actions/actions/github-script/v4.0.2/dist/index.js:52:10)
2022-03-21T13:02:56.9149929Z     at Module._compile (internal/modules/cjs/loader.js:999:30)
2022-03-21T13:02:56.9150313Z     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
2022-03-21T13:02:56.9313044Z Cleaning up orphan processes