bug: 缩进代码块或行内代码中的 `<!--` 会吞掉后续 PR 章节

Aperta
#370 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
github-actions, markdown, python
Ambito
devtools

Direzione di ricerca

Start with .github/scripts/validate_pr_body.py around line 52, where strip_html_comments runs before inline or indented code is recognised, then read complete_automated_pr_body.py near lines 26 and 38. Run test_validate_pr_body.py and add a case where an inline <!-- or a four-space indented <!-- line is followed by real ## Summary and ## Testing headings. Done when those headings are parsed and the completion script no longer raises SystemExit.

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

Descrizione

area:tests area:workflow bug repro:high triaged

问题位置

.github/scripts/validate_pr_body.py:52

触发条件

自动指导 PR 的证据摘要包含四空格缩进代码或行内代码 <!--,例如说明仓库隐藏 marker 的写法,且该行后续没有 -->。

实际影响

校验器会把该行之后所有实际的 ## Summary、## Testing 等标题都当成 HTML 注释;自动补全器追加的默认章节仍不可见,最终抛出 SystemExit,workflow 在已推送分支后无法创建或更新 PR。

核实依据

第 52 行在识别行内代码或缩进代码前直接调用 strip_html_comments;该函数只按字符串查找 <!-- 和 -->,不会跳过反引号或四空格代码块。complete_automated_pr_body.py 第 26 行反复调用 parse_sections,并在第 38 行用同一结果执行 validate_body。实测合法正文 Intro <!-- ... 和四空格 <!-- ... 都会让补全抛出 PR body needs non-empty sections;现有 test_validate_pr_body.py 只覆盖 fenced code 中的 HTML 注释。

扫描提交:e777f60106e401b086925270af317a4b36722be0;扫描日期:2026-11-25(北京时间);轮巡分片:55/90。

Lingua principale
Python
Stelle
171
Fork
24
Merge medio
3h 13m
PR unite (30g)
13

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

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 Terry-Mao/AICodingFlow

Tutte le issue di Terry-Mao/AICodingFlow

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.