github / github/vscode-github-actions

The `runner.environment` context is shown as invalid in this extension.

Abierto
#428 1 comentario 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
TypeScript
Estrellas
660
Forks
213
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

**Describe the bug**
When we use the `runner.environment` context listed in [official document](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#runner-context), this extension reports "Context access might be invalid".

**To Reproduce**
Steps to reproduce the behavior:
1. With this workflow '...'

```yaml
steps:
- if: ${{ runner.environment == 'github-hosted' }}
run: echo "This is a ${{ runner.environment }} runner"
```

2. Do this '...'

Open the "Problems" Panel.

3. See error\

```plain
Context access might be invalid: environment
```

**Expected behavior**
The `runner.environment` context listed in [official document](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#runner-context) can be recognized well by this extension.

**Screenshots**
![image](https://github.com/user-attachments/assets/335f46d8-d511-4f91-a2dd-5c78b5c0c1e3)

**Extension Version**
`v0.27.0`

**Additional context**
Add any other context about the problem here.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Empieza reproduciendo el fragmento de workflow proporcionado en la extensión e inspecciona la ruta de validación del contexto que produce la advertencia de Problems-panel. El trabajo estará terminado cuando runner.environment se reconozca según la documentación vinculada sobre el contexto del runner de GitHub Actions y la advertencia deje de aparecer para esta expresión.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
typescript
Área
tooling
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.