Use folded `description: >-` instead of `|` so WORKFLOW_DESCRIPTION reaches threat detection as one line
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 65/100
- Issue 類型
- 重構
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- github-actions, javascript
- 領域
- ci-cd
研究方向
從使用 description: | 的工作流程原始檔開始,例如 issue-triage.md,以及其 frontmatter 中的 description 鍵。閱讀 setup_threat_detection.cjs 中 WORKFLOW_DESCRIPTION 的填入方式,以及 threat_detection.md 中的那一條說明。完成標準是:字面區塊形式的描述改為 >-,使用 gh aw compile 重新編譯工作流程,且威脅偵測提示詞中的描述顯示為一行。
由索引模型根據 Issue 內容生成。
描述
Most workflows here write their frontmatter description as a literal block (description: |): 20 of them, against 3 that use > and the rest that use a plain string. The descriptions are prose wrapped at about 80 columns, so | keeps that source wrapping as real newlines in the value. Switching them to >- (folded, no trailing newline) would give the sentence as written.
Where the description ends up
gh aw compile copies description into two places in the lock file:
-
The header comment at the top of
*.lock.yml. -
WORKFLOW_DESCRIPTION, an env var on the threat-detection job.setup_threat_detection.cjssubstitutes it into the detector's prompt, where the template puts it inside a bullet:- Workflow name: {WORKFLOW_NAME} - Workflow description: {WORKFLOW_DESCRIPTION} - Full workflow instructions and context in the prompt file
The second one is what the description is for at runtime: it tells the detector what the workflow is meant to do, so it can judge whether the agent's output fits.
What | does to it
With issue-triage.md as it is today, the compiled value is:
WORKFLOW_DESCRIPTION: "Triages new and reopened issues by assessing completeness, setting issue type\nand priority labels, finding duplicates, and posting a concise maintainer-facing\nreport with actionable next steps."
so the detector receives:
- Workflow description: Triages new and reopened issues by assessing completeness, setting issue type
and priority labels, finding duplicates, and posting a concise maintainer-facing
report with actionable next steps.
The line breaks come from the editor's wrap column, not from the meaning, and they break the bullet the template sets up. A model will most likely still read it correctly, so this is a tidiness fix, not a bug. But the value is going into a prompt, and >- gives exactly the one-line string the template expects:
- Workflow description: Triages new and reopened issues by assessing completeness, setting issue type and priority labels, finding duplicates, and posting a concise maintainer-facing report with actionable next steps.
Cost
The source .md looks the same: same indentation, same wrapping, one changed indicator. When compiled with gh-aw v0.89.21, the only other lock-file changes are frontmatter_hash and the header comment, which becomes one long line instead of three wrapped ones. Nobody needs to read that comment closely, since the .md is right there.
I made this change to a copy of issue-triage.md in my own repo: shbernal/pptx-ts#276.
Suggestion
Change description: | to description: >- in the workflows that use it and recompile. The three that use > could become >- too, which drops the trailing newline (the compiler already trims it, so in practice they produce the same output). If you'd take a PR for this, I'm happy to send one.
- 主要語言
- Python
- 星號
- 1.1k
- 分支
- 163
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
githubnext/agentics 的其他 Issue
-
難度 1/5 1 小時以內 新手友好度 88/100
githubnext/agentics#420 ·
-
agentic-workflows automated documentation
難度 1/5 1 小時以內 新手友好度 1/100
githubnext/agentics#419 ·
-
Frontend未關閉
難度 5/5 一週以上 新手友好度 1/100
githubnext/agentics#418 ·
-
agentic-workflows
難度 2/5 1 小時以內 新手友好度 8/100
githubnext/agentics#415 · 1 則留言 ·
-
難度 4/5 3-5 天 新手友好度 45/100
githubnext/agentics#412 ·
查看 githubnext/agentics 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 76/100
bad-antics/lateralus-lang#1489 · 1 則留言 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 66/100
-
難度 1/5 1 小時以內 新手友好度 69/100
anderspitman/awesome-tunneling#330 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 75/100
scikit-hep/coffea#1668 ·