Skip to content

Commit 42e4abc

Browse files
committed
Fix insufficient commentUrlParamsRegex
1 parent 1fa925a commit 42e4abc

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/run.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,15 @@ export async function run() {
9494
}
9595

9696
const commentParams = commentUrlParamsRegex.exec(subjectUrl);
97-
97+
console.debug(
98+
"Extracting groups",
99+
commentParams,
100+
"from url",
101+
subjectUrl,
102+
"using regex",
103+
commentUrlParamsRegex
104+
);
105+
98106
return octokit.issues.createComment({
99107
...commentParams.groups,
100108
body: config.message,

src/utils/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ export function isBot(commentData) {
1717
export const commentUrlParamsRegex = new RegExp(
1818
// Otherwise, the escape characters are removed from the expression.
1919
// eslint-disable-next-line prettier/prettier, no-useless-escape
20-
"(?:https:\/\/)(?:api\.github\.com)\/(?:repos)\/(?<owner>[\\w-]+)\/(?<repo>[\\w-]+)\/(?:issues)\/(?<issue_number>[0-9]+)"
20+
"(?:https:\/\/)(?:api\.github\.com)\/(?:repos)\/(?<owner>[\\w.-]+)\/(?<repo>[\\w.-]+)\/(?:issues)\/(?<issue_number>[0-9]+)"
2121
);

0 commit comments

Comments
 (0)