Skip to content

Commit 8043d53

Browse files
fix regex
1 parent c9b5266 commit 8043d53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,11 @@ TEST: addTests('isPRList', [
254254
'https://github.com/sindresorhus/refined-github/pulls?q=is%3Apr+is%3Aclosed',
255255
]);
256256

257-
// `commits` -> `changes` Since December 2025
258-
export const isPRCommit = (url: URL | HTMLAnchorElement | Location = location): boolean => /^pull\/\d+\/commits|changes\/[\da-f]{5,40}$/.test(getRepo(url)?.path);
257+
export const isPRCommit = (url: URL | HTMLAnchorElement | Location = location): boolean => /^pull\/\d+\/(commits|changes)\/[\da-f]{5,40}$/.test(getRepo(url)?.path);
259258
TEST: addTests('isPRCommit', [
260259
'https://github.com/sindresorhus/refined-github/pull/148/commits/0019603b83bd97c2f7ef240969f49e6126c5ec85',
261260
'https://github.com/sindresorhus/refined-github/pull/148/commits/00196',
261+
// Since December 2025
262262
'https://github.com/sindresorhus/refined-github/pull/148/changes/0019603b83bd97c2f7ef240969f49e6126c5ec85',
263263
'https://github.com/sindresorhus/refined-github/pull/148/changes/00196',
264264
]);

0 commit comments

Comments
 (0)