Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Unhelpful errors on syntax issues

オープン
#498 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
github-actions, javascript, typescript

調査の方向性

Start from the script execution path represented by callAsyncFunction and main in the reported dist/index.js stack, and trace how syntax errors from the action code are surfaced. Done means syntax errors identify the relevant line in the supplied script, ideally including the source line, with tests covering the improved output.

索引モデルが issue の本文から書いたものです。

説明

Is your feature request related to a problem? Please describe.

Currently problems with action code can cause errors like this:

SyntaxError: Unexpected token '.'
    at new AsyncFunction (<anonymous>)
    at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:[35](https://github.com/dktapps/RestrictedActions/actions/runs/11989435916/job/33425884775#step:4:36)424: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:1358:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at Module.load (node:internal/modules/cjs/loader:1208:32)
    at Module._load (node:internal/modules/cjs/loader:1024:12)

I haven't the faintest clue where or why this happened with my code. Plugging it into a linter didn't reveal any problems.

It would be nice if the error output included a line number in the actual action code to show where the problem occurred, or even better printed the line in question.

Here's the code this happened with, if it's relevant:

      - name: "Check if bot's review was dismissed (pull_request_review.dismissed only)"
        id: re-review
        uses: actions/github-script@v7
        env:
          APP_SLUG: ${{ steps.generate-token.outputs.app-slug }}
          REVIEWER_ID: ${{ github.event.client_payload.reviewer_id }}
        with:
          github-token: ${{ steps.generate-token.outputs.token }}
          script: |
            const reviewer_id = process.env.REVIEWER_ID;
            console.log(reviewer_id);
            if (reviewer_id === "0") {
              console.log("No reviewer ID provided, continuing with re-review");
              core.setOutput('skip', 'false');
            } else {
              console.log("Reviewer ID provided: " + reviewer_id);
              const user_info = await github.rest.users.getByUsername({
                process.env.APP_SLUG + '[bot]'
              });
              const bot_user_id = user_info.data.id;
              if (bot_user_id != reviewer_id) {
                console.log(`Not the bot's review that was dismissed (expected user ID: ${bot_user_id}, got: ${reviewer_id})`);
                console.log('Skipping re-review');
                core.setOutput('skip', 'true');
              } else {
                console.log("Bot's review was dismissed, continuing with re-review");
                core.setOutput('skip', 'false');
              }
            }

Describe the solution you'd like

It would be nice if the error output included a line number in the actual action code to show where the problem occurred, or even better printed the line in question.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

主要言語
TypeScript
スター
5k
フォーク
586
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

actions/github-script のほかの issue

actions/github-script の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。