Use folded `description: >-` instead of `|` so WORKFLOW_DESCRIPTION reaches threat detection as one line

オープン 初心者向け
#402 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
65/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
github-actions, javascript
領域
ci-cd

調査の方向性

description: | を使っているワークフローのソース(例: issue-triage.md)と、そのフロントマターの description キーから始めてください。setup_threat_detection.cjs で WORKFLOW_DESCRIPTION がどのように設定されているか、そして threat_detection.md の該当箇条書きを読んでください。リテラルブロックの description を >- に変更し、gh aw compile でワークフローを再コンパイルし、脅威検出プロンプトで description が1行で表示されれば完了です。

索引モデルが 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:

  1. The header comment at the top of *.lock.yml.

  2. WORKFLOW_DESCRIPTION, an env var on the threat-detection job. setup_threat_detection.cjs substitutes 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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

githubnext/agentics のほかの issue

githubnext/agentics の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。