octokit.rest.actions not available

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
github-actions, javascript, typescript
領域
api, ci-cd, devtools

調査の方向性

Start with the github-script v6 workflow entry point and the documented octokit.rest.actions.getEnvironmentVariable call shown in the reproduction. Compare the available github.rest.actions methods with the documented endpoint and run the supplied workflow to confirm the failure. Done means the documented call is available or the mismatch is clearly resolved.

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

説明

dependencies good first issue

Describe the bug

TypeError: github.rest.actions.getEnvironmentVariable is not a function
    at eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:15099:16), <anonymous>:3:43)
    at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:15100:12)
    at main (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:15[19](https://github.com/g2crowd/actions_test/actions/runs/4372190858/jobs/7648818737#step:2:20)8:26)
    at /home/runner/work/_actions/actions/github-script/v6/dist/index.js:15175:1
    at /home/runner/work/_actions/actions/github-script/v6/dist/index.js:15230:3
    at Object.<anonymous> (/home/runner/work/_actions/actions/github-script/v6/dist/index.js:15233:12)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:8[22](https://github.com/g2crowd/actions_test/actions/runs/4372190858/jobs/7648818737#step:2:23):12)
Error: Unhandled error: TypeError: github.rest.actions.getEnvironmentVariable is not a function

To Reproduce

jobs:
  check-env:
    name: Validate Environment Configuration
    environment: staging
    runs-on: ubuntu-latest
    steps:
      - uses: actions/github-script@v6
        with:
          script: |
            const sidecar = await github.rest.actions.getEnvironmentVariable({
              repository_id: context.repo.id,
              environment_name: context.payload.client_payload.environment,
              name: 'SIDECAR'
            });
            console.log(JSON.stringify(sidecar));
            return;

Expected behavior
github.rest.actions.getEnvironmentVariable should be defined as documented in octokit/rest

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

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

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

はじめの一歩

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

actions/github-script のほかの issue

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

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

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