Skip to content

Commit

Permalink
Fix isRepositoryActions() (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
cheap-glitch committed Mar 4, 2021
1 parent e1bfcff commit 4c43562
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/esm-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- uses: actions/download-artifact@v2
- run: npm install ./artifact
- run: echo "${{ env.IMPORT_TEXT }} '${{ env.NPM_MODULE_NAME }}'" > index.js
- run: npx parcel@1 build index.js
- run: npx parcel@1.12.3 build index.js
- run: cat dist/index.js
Rollup:
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,11 @@ collect.set('isNewAction', [
'https://github.com/sindresorhus/refined-github/actions/new',
]);

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

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

0 comments on commit 4c43562

Please sign in to comment.