Skip to content

Commit

Permalink
Last
Browse files Browse the repository at this point in the history
  • Loading branch information
knocte committed Sep 10, 2024
1 parent b9716a3 commit 0a91fe5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion commitlint/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export abstract class Helpers {

public static findUrls(text: string) {
var urlRegex = /(https?:\/\/[^\s]+)/g;
return text.match(urlRegex);
return OptionStatic.OfObj(text.match(urlRegex));
}

public static isCommitUrl(url: string) {
Expand Down
4 changes: 2 additions & 2 deletions commitlint/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ export abstract class Plugins {

let gitRepo = OptionStatic.OfObj(process.env["GITHUB_REPOSITORY"]);
if (!(gitRepo instanceof None)) {
if (urls !== null) {
for (let url of urls.entries()) {
if (!(urls instanceof None)) {
for (let url of urls.value.entries()) {
let urlStr = url[1].toString();
if (
Helpers.isCommitUrl(urlStr) &&
Expand Down

0 comments on commit 0a91fe5

Please sign in to comment.