github / github/vscode-github-actions

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
bug
Lingua principale
TypeScript
Stelle
660
Fork
213
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## 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:

```yaml
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"

Guida per i contributori

Apri la guida per i contributori

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.

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.