SyntaxError: Unexpected identifier 'URL' when updating PR content with @v7 (Previously Working)
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- github-actions, javascript, typescript
Direção de pesquisa
Start with .github/workflows/pr-release.yml lines 104-119 in the linked repository and reproduce the failing run using actions/github-script@v6 and @v7. Compare the workflow script with the reported AsyncFunction stack traces in the run logs. Done means the cause of the SyntaxError is identified and the workflow can update the pull request content successfully.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
I'm encountering a SyntaxError: Unexpected identifier 'URL' when attempting to update PR content using actions/github-script@v7. This specific script was working correctly in previous runs and has only recently started failing.
My Repository: https://github.com/tangcent/easy-yapi
Relevant Workflow File: https://github.com/tangcent/easy-yapi/blob/d00f1af4a406766a020d0da822975ba33542cdd7/.github/workflows/pr-release.yml#L104-L119
Failing Workflow Run: https://github.com/tangcent/easy-yapi/actions/runs/15807636615/job/44554634082?pr=1252
Error Details from Workflow Log:
Run actions/github-script@v7
SyntaxError: Unexpected identifier 'URL'
at new AsyncFunction (<anonymous>)
at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:354[24](https://github.com/tangcent/easy-yapi/actions/runs/15807636615/job/44554634082?pr=1252#step:6:25):16)
at main (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35522:[26](https://github.com/tangcent/easy-yapi/actions/runs/15807636615/job/44554634082?pr=1252#step:6:27))
at /home/runner/work/_actions/actions/github-script/v7/dist/index.js:35497:1
at /home/runner/work/_actions/actions/github-script/v7/dist/index.js:35553:3
at Object.<anonymous> (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35556:12)
at Module._compile (node:internal/modules/cjs/loader:1529:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1613:10)
at Module.load (node:internal/modules/cjs/loader:1[27](https://github.com/tangcent/easy-yapi/actions/runs/15807636615/job/44554634082?pr=1252#step:6:28)5:32)
at Module._load (node:internal/modules/cjs/loader:1096:12)
Error: Unhandled error: SyntaxError: Unexpected identifier 'URL'
I initially observed this error with @v7, and, to troubleshoot, I also tried using actions/github-script@v6, but it produced the exact same SyntaxError:
Run actions/github-script@v6
SyntaxError: Unexpected identifier 'URL'
at new AsyncFunction (<anonymous>)
at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:15143:16)
at main (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:15236:[26](https://github.com/tangcent/easy-yapi/actions/runs/15807636615/job/44554634082?pr=1252#step:6:27))
at /home/runner/work/_actions/actions/github-script/v6/dist/index.js:15217:1
at /home/runner/work/_actions/actions/github-script/v6/dist/index.js:15268:3
at Object.<anonymous> (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:15[27](https://github.com/tangcent/easy-yapi/actions/runs/15807636615/job/44554634082?pr=1252#step:6:28)1:12)
at Module._compile (node:internal/modules/cjs/loader:1529:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1613:10)
at Module.load (node:internal/modules/cjs/loader:1275:32)
at Module._load (node:internal/modules/cjs/loader:1096:12)
Error: Unhandled error: SyntaxError: Unexpected identifier 'URL'
I've tried to debug the issue by cloning this repository, but I haven't been able to pinpoint the cause of this error. Any assistance would be greatly appreciated.
- Linguagem predominante
- TypeScript
- Estrelas
- 5k
- Forks
- 586
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de actions/github-script
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 48/100
actions/github-script#728 ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 52/100
actions/github-script#727 · 1 reação ·
-
{ Aberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 10/100
actions/github-script#724 ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
actions/github-script#723 · 1 comentário ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
actions/github-script#714 · 1 comentário · 4 reações ·
Todas as issues de actions/github-script
Issues semelhantes
-
blocklist removal
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
pastelsky/bundlephobia#1122 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100