Skip to content

Commit 4a9bd1c

Browse files
committed
fix: fix actions script.
1 parent 29e2f4b commit 4a9bd1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/add_component.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ info(`${issueBody}`);
5656
endGroup();
5757
5858
const data = issueBody.split('### ').filter(Boolean);
59-
const githubUrlRegex = /^(https?:\/\/)?(www\.)?github\.com\/(.*)$/;
59+
const githubUrlRegex = /^(https?:\/\/)?(www\.)?github\.com\/[a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+(\/)?$/;
6060
const githubUrl = data[0].split('\n').filter(Boolean)[1];
6161
if (githubUrlRegex.test(githubUrl)) {
6262
info(`GitHub URL: \x1b[32;1m${githubUrl}\x1b[0m`);

0 commit comments

Comments
 (0)