github / github/vscode-github-actions

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

Aberta
#609 0 comentários 0 reações 0 responsáveis Ver no GitHub
bug
Linguagem predominante
TypeScript
Estrelas
660
Forks
213
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Start by locating the GitHub Actions input validation that reads Azure/static-web-apps-deploy@v1's action.yml and reproduce the close_pull_request_job workflow shown here. The work is done when action: "close" no longer reports app_location as missing, while the upload pattern still validates its required inputs.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
github-actions, typescript
Domínio
developer-experience
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Pouca atividade
Clareza
Razoavelmente clara
Facilidade para iniciantes
58/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.