Skip to content

Commit 5025fd3

Browse files
authored
Merge pull request #9883 from raman976/fix/markdown-url-regex
Support Markdown-style links in PR template URL check
2 parents 03eabbb + b22ae67 commit 5025fd3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/validate.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ jobs:
6464
const checkbox2 = /\[x\].*?I have read and accepted/i.test(body);
6565
6666
// 2. URL must be on the exact "The site content can be seen at ..." line
67-
const urlLineRegex = /^[ \t]*-[ \t]*The site content can be seen at[ \t]+(https?:\/\/[^\s]+)/m;
67+
// https://regex101.com/r/N36fsT
68+
const urlLineRegex = /^[ \t]*-[ \t]*The site content can be seen at[ \t]+(?:<)?(?:\[.*?\]\()?https?:\/\/[^\s>()]+(?:\))?(?:>)?/m;
6869
const urlMatch = urlLineRegex.exec(body);
6970
const urlValid = urlMatch !== null;
7071

0 commit comments

Comments
 (0)