Skip to content

Commit

Permalink
fix: fix actions script.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Mar 27, 2024
1 parent 29e2f4b commit 4a9bd1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/add_component.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ info(`${issueBody}`);
endGroup();
const data = issueBody.split('### ').filter(Boolean);
const githubUrlRegex = /^(https?:\/\/)?(www\.)?github\.com\/(.*)$/;
const githubUrlRegex = /^(https?:\/\/)?(www\.)?github\.com\/[a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+(\/)?$/;
const githubUrl = data[0].split('\n').filter(Boolean)[1];
if (githubUrlRegex.test(githubUrl)) {
info(`GitHub URL: \x1b[32;1m${githubUrl}\x1b[0m`);
Expand Down

0 comments on commit 4a9bd1c

Please sign in to comment.