Skip to content

Commit 6dcacea

Browse files
update links, correct short hash length
1 parent 5c5182a commit 6dcacea

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

index.ts

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

257-
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]{7,40}$/.test(getRepo(url)?.path);
258258
TEST: addTests('isPRCommit', [
259-
'https://github.com/sindresorhus/refined-github/pull/148/commits/0019603b83bd97c2f7ef240969f49e6126c5ec85',
260-
'https://github.com/sindresorhus/refined-github/pull/148/commits/00196',
259+
'https://github.com/sindresorhus/refined-github/pull/148/commits/1e27d7998afdd3608d9fc3bf95ccf27fa5010641',
260+
'https://github.com/sindresorhus/refined-github/pull/148/commits/1e27d79',
261261
// Since December 2025
262-
'https://github.com/sindresorhus/refined-github/pull/148/changes/0019603b83bd97c2f7ef240969f49e6126c5ec85',
263-
'https://github.com/sindresorhus/refined-github/pull/148/changes/00196',
262+
'https://github.com/sindresorhus/refined-github/pull/148/changes/1e27d7998afdd3608d9fc3bf95ccf27fa5010641',
263+
'https://github.com/sindresorhus/refined-github/pull/148/changes/1e27d79',
264264
]);
265265

266266
export const isPRCommit404 = (): boolean => isPRCommit() && document.title.startsWith('Commit range not found · Pull Request');

0 commit comments

Comments
 (0)