mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-07-26 22:42:17 +00:00
Fix needs-info log section parsing
This commit is contained in:
parent
1a2eca2341
commit
09afea7c35
1 changed files with 5 additions and 1 deletions
6
.github/workflows/triage-needs-info.yml
vendored
6
.github/workflows/triage-needs-info.yml
vendored
|
|
@ -32,8 +32,12 @@ jobs:
|
|||
return labels.includes(name.toLowerCase());
|
||||
}
|
||||
|
||||
function escapeRegExp(value) {
|
||||
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
}
|
||||
|
||||
function extractSection(title) {
|
||||
const re = new RegExp(`^###\\s+${title.replace(/[.*+?^${}()|[\\]\\\\]/g, "\\\\$&")}\\s*$`, "m");
|
||||
const re = new RegExp(`^###\\s+${escapeRegExp(title)}\\s*$`, "m");
|
||||
const match = body.match(re);
|
||||
if (!match) return "";
|
||||
const start = match.index + match[0].length;
|
||||
|
|
|
|||
Loading…
Reference in a new issue