Skip to content

Commit

Permalink
Add isActionRun
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Oct 10, 2020
1 parent a3ee102 commit 9aa12dc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,14 @@ collect.set('isMarketplaceAction', [
export const isActionJobRun = (url: URL | Location = location): boolean => String(getRepoPath(url)).startsWith('runs/');
collect.set('isActionJobRun', [
'https://github.com/sindresorhus/refined-github/runs/639481849',
'https://github.com/fregante/github-url-detection/runs/1224552520?check_suite_focus=true',
]);

export const isActionRun = (url: URL | Location = location): boolean => /^(actions\/)?runs/.test(getRepoPath(url)!);
collect.set('isActionRun', [
'https://github.com/sindresorhus/refined-github/runs/639481849',
'https://github.com/fregante/github-url-detection/runs/1224552520?check_suite_focus=true',
'https://github.com/fregante/github-url-detection/actions/runs/294962314',
]);

export const isNewAction = (url: URL | Location = location): boolean => String(getRepoPath(url)) === 'actions/new';
Expand Down

0 comments on commit 9aa12dc

Please sign in to comment.