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:
@@ -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