Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Unrecognized Github Actions Secret Context

未關閉
#461 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
github-actions, typescript, vscode
領域
ci-cd, devtools

研究方向

首先,使用提供的 jobs YAML、名為 TWITCH-DOWNLOADER 的環境,以及工作流程中參照的兩個環境 secret 重現該警告。追蹤 GitHub Actions Extension 如何驗證 secret 和環境內容;當環境 secret 在沒有 missing-or-undefined 警告的情況下被辨識時,即表示完成。

由索引模型根據 Issue 內容生成。

描述

bug

Describe the bug

  • I have a GitHub Actions workflow, VSCode recommended me the Extension.
  • And i use the Environment Feature for GitHub Action Secrets.
  • This is not recognized by the Extension,
    • even that the Environment Secrets works when i let the Action run.
    • Even more frustrating:
      • there seems to be no option to ignore or comment out that warning that the secret isn't valid
      • we need an option to ignore that if the Extension fails to read the environment context

To Reproduce
Steps to reproduce the behavior:

  1. The beginning of the Jobs YAML:

jobs:
test:
runs-on: ubuntu-latest
environment: TWITCH-DOWNLOADER
...

  1. The Step that Uses the Secrets:
  • name: Schreibe Secrets in .env-Datei
    run: |
    echo "TWITCH_CLIENT_ID=${{ secrets.TWITCH_CLIENT_ID }}" >> .env
    echo "TWITCH_CLIENT_SECRET=${{ secrets.TWITCH_CLIENT_SECRET }}" >> .env

The Repo itself private, but i guess the error is easy to reproducible with

  • create a repo
  • creating a environment with that name (in https://github.com/(user)/(repo)/settings/secrets/actions)
  • creating 2 Secrets named like that in that environment
  • creating a github action yaml file with just that step above
  • Save
  • The Yaml loaded into VSCode with the GitHub Actions Extension running
    X the Secrets will be recognized as missing or not defined X

Expected behavior
To recognize the Environment and the Secrets in there

主要語言
TypeScript
星號
661
分支
214
PR 合併指標
30 天內沒有已合併 PR

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

github/vscode-github-actions 的其他 Issue

查看 github/vscode-github-actions 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。