octokit.rest.actions not available

Aperta
#345 16 commenti 15 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

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.

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

Descrizione

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

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.