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

Aperta Adatta ai principianti
#402 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
65/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github-actions, javascript
Ambito
ci-cd

Direzione di ricerca

Inizia dalle sorgenti dei workflow che usano description: |, come issue-triage.md, e dalla chiave description nel loro frontmatter. Leggi come viene valorizzata WORKFLOW_DESCRIPTION in setup_threat_detection.cjs e il punto in threat_detection.md. È completato quando le descrizioni a blocco letterale sono cambiate in >-, i workflow sono ricompilati con gh aw compile e il prompt di threat detection mostra la descrizione su una sola riga.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
1.1k
Fork
163
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di githubnext/agentics

Tutte le issue di githubnext/agentics

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.