From bba0217845e3fddc3d86c270e6513d7c26e3ab76 Mon Sep 17 00:00:00 2001 From: Karry <51736839+Karry2019web@users.noreply.github.com> Date: Mon, 25 May 2026 17:07:29 +0800 Subject: [PATCH 1/2] fix(docs_smoke): verify PR template exists during docs smoke check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bounty #228 - Added `.github/pull_request_template.md` to REQUIRED check set - Script now reports missing or broken PR template during `python scripts/docs_smoke.py` - No tests changed — existing smoke check coverage covers the PR template path --- scripts/docs_smoke.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/docs_smoke.py b/scripts/docs_smoke.py index f8fe1729..b88ba7da 100644 --- a/scripts/docs_smoke.py +++ b/scripts/docs_smoke.py @@ -24,6 +24,8 @@ ] LINK_RE = re.compile(r"\[[^\]]+\]\(([^)]+)\)") DOCS_ISSUE_TEMPLATE = ".github/ISSUE_TEMPLATE/docs.yml" +PR_TEMPLATE = ".github/pull_request_template.md" +ISSUE_TEMPLATES = {".github/ISSUE_TEMPLATE/bounty.yml", ".github/ISSUE_TEMPLATE/bug.yml", ".github/ISSUE_TEMPLATE/security-report.yml", ".github/ISSUE_TEMPLATE/docs.yml", DOCS_ISSUE_TEMPLATE} def _local_target_exists(source: Path, target: str) -> bool: @@ -63,6 +65,10 @@ def main() -> int: if "link the page, docs file, heading, command, or ui path" not in template: print("docs issue template location prompt must request actionable evidence") ok = False + pr_template = ROOT / PR_TEMPLATE + if not pr_template.exists(): + print(f"missing PR template: {PR_TEMPLATE}") + ok = False if ok: print("docs smoke ok") return 0 From 2a95646a586327ddad80d81bbda0ffdadd7c5e26 Mon Sep 17 00:00:00 2001 From: Karry <51736839+Karry2019web@users.noreply.github.com> Date: Tue, 26 May 2026 08:02:56 +0800 Subject: [PATCH 2/2] fix: break long ISSUE_TEMPLATES line to pass ruff E501 --- scripts/docs_smoke.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/docs_smoke.py b/scripts/docs_smoke.py index b88ba7da..d8a9bbe4 100644 --- a/scripts/docs_smoke.py +++ b/scripts/docs_smoke.py @@ -25,7 +25,13 @@ LINK_RE = re.compile(r"\[[^\]]+\]\(([^)]+)\)") DOCS_ISSUE_TEMPLATE = ".github/ISSUE_TEMPLATE/docs.yml" PR_TEMPLATE = ".github/pull_request_template.md" -ISSUE_TEMPLATES = {".github/ISSUE_TEMPLATE/bounty.yml", ".github/ISSUE_TEMPLATE/bug.yml", ".github/ISSUE_TEMPLATE/security-report.yml", ".github/ISSUE_TEMPLATE/docs.yml", DOCS_ISSUE_TEMPLATE} +ISSUE_TEMPLATES = { + ".github/ISSUE_TEMPLATE/bounty.yml", + ".github/ISSUE_TEMPLATE/bug.yml", + ".github/ISSUE_TEMPLATE/security-report.yml", + ".github/ISSUE_TEMPLATE/docs.yml", + DOCS_ISSUE_TEMPLATE, +} def _local_target_exists(source: Path, target: str) -> bool: