Skip to content

Commit

Permalink
Add hasFiles (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
kidonng committed Jan 15, 2022
1 parent 91f1e93 commit b68c0e8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,12 @@ export const hasCode = (url: URL | HTMLAnchorElement | Location = location): boo
|| isCompare(url)
|| isBlame(url);

collect.set('hasFiles', combinedTestOnly);
export const hasFiles = (url: URL | HTMLAnchorElement | Location = location): boolean => // Has a list of files
isCommit(url)
|| isCompare(url)
|| isPRFiles(url);

export const isMarketplaceAction = (url: URL | HTMLAnchorElement | Location = location): boolean => url.pathname.startsWith('/marketplace/actions/');
collect.set('isMarketplaceAction', [
'https://github.com/marketplace/actions/urlchecker-action',
Expand Down

0 comments on commit b68c0e8

Please sign in to comment.