Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

SyntaxError: Unexpected identifier 'URL' when updating PR content with @v7 (Previously Working)

Aperta
#622 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
github-actions, javascript, typescript
Ambito
ci-cd, devops

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
5k
Fork
586
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di actions/github-script

Tutte le issue di actions/github-script

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.