github.rest.actions.createWorkflowDispatch() calls deprecated API

Aperta
#727 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Start at the github.rest.actions.createWorkflowDispatch() entry point used in the actions/github-script workflow step, then review the linked GitHub REST API version guidance. Trace how this method is exposed and determine what update removes the deprecation warning while preserving workflow dispatch behavior; done means the workflow runs without that warning.

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

Descrizione

We have a workflow step like this:

      - name: Call validation workflow
        uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
        with:
          github-token: TOKEN
          script: |
            await github.rest.actions.createWorkflowDispatch({
              owner: OWNER,
              repo: REPO,
              workflow_id: WORKFLOW_ID,
              ref: 'master'
            });

When running it, we get the following warning in the log:

[@octokit/request] "POST https://api.github.com/repos/OWNER/REPO/actions/workflows/WORKFLOW_ID/dispatches" is deprecated. It is scheduled to be removed on Fri, 10 Mar 2028 00:00:00 GMT. See https://docs.github.com/en/rest/about-the-rest-api/api-versions

Is there anything we could update to use the new API version?

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.