Skip to content

Commit b7dc300

Browse files
authored
Add isEditingRelease (#11)
1 parent b406cb7 commit b7dc300

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,11 @@ collect.set('isEditingFile', [
225225
'https://github.com/sindresorhus/refined-github/edit/ghe-injection/source/background.ts',
226226
]);
227227

228+
export const isEditingRelease = (url: URL | Location = location): boolean => String(getRepoPath(url)).startsWith('releases/edit');
229+
collect.set('isEditingRelease', [
230+
'https://github.com/sindresorhus/refined-github/releases/edit/v1.2.3',
231+
]);
232+
228233
export const isRepo = (url: URL | Location = location): boolean => /^[^/]+\/[^/]+/.test(getCleanPathname(url)) &&
229234
!reservedNames.includes(url.pathname.split('/', 2)[1]) &&
230235
!isDashboard(url) &&

0 commit comments

Comments
 (0)