Skip to content

Commit 4c43562

Browse files
authored
Fix isRepositoryActions() (#63)
1 parent e1bfcff commit 4c43562

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/esm-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- uses: actions/download-artifact@v2
4444
- run: npm install ./artifact
4545
- run: echo "${{ env.IMPORT_TEXT }} '${{ env.NPM_MODULE_NAME }}'" > index.js
46-
- run: npx parcel@1 build index.js
46+
- run: npx parcel@1.12.3 build index.js
4747
- run: cat dist/index.js
4848
Rollup:
4949
runs-on: ubuntu-latest

index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,9 +507,11 @@ collect.set('isNewAction', [
507507
'https://github.com/sindresorhus/refined-github/actions/new',
508508
]);
509509

510-
export const isRepositoryActions = (url: URL | HTMLAnchorElement | Location = location): boolean => getRepo(url)?.path === 'actions';
510+
export const isRepositoryActions = (url: URL | HTMLAnchorElement | Location = location): boolean => /^actions(\/workflows\/.+\.ya?ml)?$/.test(getRepo(url)?.path!);
511511
collect.set('isRepositoryActions', [
512512
'https://github.com/fregante/github-url-detection/actions',
513+
'https://github.com/fregante/github-url-detection/actions/workflows/demo.yml',
514+
'https://github.com/fregante/github-url-detection/actions/workflows/esm-lint.yml',
513515
]);
514516

515517
export const canUserEditOrganization = (): boolean => isOrganizationProfile() && exists('.pagehead-tabs-item[href$="/settings/profile"]');

0 commit comments

Comments
 (0)