mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-04 19:59:54 +08:00
chore: update the "routes" example in the pull request template to make it less confusing (#14415)
* Fix: a typo in the pull request template * Enhance: when parsing routes from PR body, remove all comments.
This commit is contained in:
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -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
|
||||
|
||||
@@ -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(/<!--[\S\s]*?-->/g, '');
|
||||
const m = bodyNoCmts.match(/```routes\s+([\S\s]*?)```/);
|
||||
core.debug(`match: ${m}`);
|
||||
let res = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user