Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Not able to use setTimeOut or Date function in script#454

Unanswered
rgarg-quotient asked this question inQ&A
Discussion options

Hi,

I am trying to implement below scenario using github-script action:

  • Get a check_run status
  • If check_run status is queued or in_progress, then wait for 10sec and recheck
  • do above untill get check_run status as completed

I am trying to use setTimeOut function to wait for 10secs (Ref:https://codewithsnowbit.hashnode.dev/how-can-you-implement-the-sleep-function-in-javascript)

but I get below error in workflow run:

SyntaxError: Invalid or unexpected token    at new AsyncFunction (<anonymous>)    at callAsyncFunction (/home/runner/_work/_actions/actions/github-script/v7/dist/index.js:35424:16)    at main (/home/runner/_work/_actions/actions/github-script/v7/dist/index.js:35522:26)    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:1241:14)    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)    at Module.load (node:internal/modules/cjs/loader:1091:32)    at Module._load (node:internal/modules/cjs/loader:938:12)Error: Unhandled error: SyntaxError: Invalid or unexpected token

Please let me know what might be the issue.

You must be logged in to vote

Replies: 0 comments

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
1 participant
@rgarg-quotient

[8]ページ先頭

©2009-2025 Movatter.jp