Skip to content

Commit eef68e2

Browse files
authored
Drop Page from isSingleTagPage and isActionPage (#32)
1 parent 7ab40fb commit eef68e2

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

index.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,12 +407,16 @@ export const isUserProfileFollowingTab = (): boolean =>
407407
isUserProfile() &&
408408
new URLSearchParams(location.search).get('tab') === 'following';
409409

410-
export const isSingleTagPage = (url: URL | Location = location): boolean => /^(releases\/tag)/.test(getRepoPath(url)!);
411-
collect.set('isSingleTagPage', [
410+
export const isSingleTag = (url: URL | Location = location): boolean => /^(releases\/tag)/.test(getRepoPath(url)!);
411+
collect.set('isSingleTag', [
412412
'https://github.com/sindresorhus/refined-github/releases/tag/v1.0.0-beta.4',
413413
'https://github.com/sindresorhus/refined-github/releases/tag/0.2.1',
414414
]);
415415

416+
/** @deprecated use isSingleTag instead */
417+
export const isSingleTagPage = isSingleTag;
418+
collect.set('isSingleTagPage', combinedTestOnly);
419+
416420
collect.set('hasComments', combinedTestOnly);
417421
export const hasComments = (url: URL | Location = location): boolean =>
418422
isPR(url) ||
@@ -435,13 +439,17 @@ export const hasCode = (url: URL | Location = location): boolean => // Static co
435439
isCompare(url) ||
436440
isBlame(url);
437441

438-
export const isActionPage = (url: URL | Location = location): boolean => url.pathname.startsWith('/marketplace/actions/');
439-
collect.set('isActionPage', [
442+
export const isActions = (url: URL | Location = location): boolean => url.pathname.startsWith('/marketplace/actions/');
443+
collect.set('isActions', [
440444
'https://github.com/marketplace/actions/urlchecker-action',
441445
'https://github.com/marketplace/actions/github-action-for-assignee-to-reviewer',
442446
'https://github.com/marketplace/actions/hugo-actions',
443447
]);
444448

449+
/** @deprecated use isActions instead */
450+
export const isActionPage = isActions;
451+
collect.set('isActionPage', combinedTestOnly);
452+
445453
export const isActionJobRun = (url: URL | Location = location): boolean => String(getRepoPath(url)).startsWith('runs/');
446454
collect.set('isActionJobRun', [
447455
'https://github.com/sindresorhus/refined-github/runs/639481849',

0 commit comments

Comments
 (0)