发布

  • fix(gh): show fallback note when PR/issue body is filtered to empty

    frostbyte_neo 发布于 2026-05-31 15:35:20 +00:00

    When filter_markdown_body() strips a PR or issue body to empty
    (body contained only badges, images, HTML comments, or horizontal
    rules), format_pr_view and format_issue_view previously skipped
    the body section silently. Users had no indication that body content
    had been present and filtered.

    Now both views emit a fallback note when the filtered body is empty
    but the raw body was not:

    PR view: (body contained only badges/images/comments)
    Issue view: Description: (body contained only badges/images/comments)

    The 4 added tests cover:

    • PR body with only badges/images/comments -> fallback note appears
    • PR body with real content -> no fallback note (sanity)
    • PR body empty (raw) -> no fallback note (no signal to give)
    • Issue body badges-only -> fallback note appears

    Closes #235

    Co-authored-by: polaminggkub-debug polaminggkub-debug@users.noreply.github.com

    下载附件