False positive missing-required-inputs for app_location when action: "close" in Azure Static Web Apps deploy

Aperta
#609 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Inizia individuando la convalida degli input di GitHub Actions che legge l’action.yml di Azure/static-web-apps-deploy@v1 e riproduci il workflow close_pull_request_job mostrato qui. Il lavoro è completato quando action: "close" non segnala più app_location come mancante, mentre il modello di caricamento continua a convalidare i suoi input obbligatori.

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

Descrizione

bug

Bug report

Describe the bug

The extension reports a missing-required-inputs error for app_location on the
close_pull_request_job pattern recommended by Azure Static Web Apps. The workflow
runs successfully in CI — the error is a false positive.

Azure/static-web-apps-deploy@v1 marks app_location as required: true in its
action.yml, but the field is only meaningful when action: "upload". When
action: "close", the action ignores app_location entirely and completes without it.

Steps to reproduce

Use the standard close-PR job that Azure's own onboarding wizard generates, with GitHub Actions extension installed:

build_and_deploy_job:
    if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
    runs-on: ubuntu-latest
    name: Build and Deploy Job
    permissions:
       id-token: write
       contents: read
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: true
          lfs: false
      - name: Build And Deploy
        id: builddeploy
        uses: Azure/static-web-apps-deploy@v1
        with:
          azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
          repo_token: ${{ secrets.GITHUB_TOKEN }}
          action: "upload"
          app_location: "/"
          #api_location: "api"
          output_location: "dist"

close_pull_request_job:
  if: github.event_name == 'pull_request' && github.event.action == 'closed'
  runs-on: ubuntu-latest
  name: Close Pull Request Job
  steps:
    - name: Close Pull Request
      id: closepullrequest
      uses: Azure/static-web-apps-deploy@v1
      with:
        azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
        action: "close"
Lingua principale
TypeScript
Stelle
661
Fork
214
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

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 github/vscode-github-actions

Tutte le issue di github/vscode-github-actions

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.