diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d43ff9baa9..cc44504344 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -15,7 +15,7 @@ Fail to comply will result in your pull request being closed automatically. 请在 `routes` 区域填写以 / 开头的完整路由地址,否则你的 PR 将会被无条件关闭。 如果路由包含在文档中列出可以完全穷举的参数(例如分类),请依次全部列出。 -```route +```routes /some/route /some/other/route /dont/use/this/or/modify/it diff --git a/scripts/workflow/test-route/identify.js b/scripts/workflow/test-route/identify.js index 4e2eb517a7..4a5199ff2c 100644 --- a/scripts/workflow/test-route/identify.js +++ b/scripts/workflow/test-route/identify.js @@ -4,7 +4,9 @@ const allowedUser = new Set(['dependabot[bot]', 'pull[bot]']); // dependabot and module.exports = async ({ github, context, core }, body, number, sender) => { core.debug(`sender: ${sender}`); core.debug(`body: ${body}`); - const m = body.match(/```routes\s+([\S\s]*?)```/); + // Remove all HTML comments before performing the match + const bodyNoCmts = body.replaceAll(//g, ''); + const m = bodyNoCmts.match(/```routes\s+([\S\s]*?)```/); core.debug(`match: ${m}`); let res = null;