Skip to content

Commit b68c0e8

Browse files
authored
Add hasFiles (#112)
1 parent 91f1e93 commit b68c0e8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,12 @@ export const hasCode = (url: URL | HTMLAnchorElement | Location = location): boo
601601
|| isCompare(url)
602602
|| isBlame(url);
603603

604+
collect.set('hasFiles', combinedTestOnly);
605+
export const hasFiles = (url: URL | HTMLAnchorElement | Location = location): boolean => // Has a list of files
606+
isCommit(url)
607+
|| isCompare(url)
608+
|| isPRFiles(url);
609+
604610
export const isMarketplaceAction = (url: URL | HTMLAnchorElement | Location = location): boolean => url.pathname.startsWith('/marketplace/actions/');
605611
collect.set('isMarketplaceAction', [
606612
'https://github.com/marketplace/actions/urlchecker-action',

0 commit comments

Comments
 (0)