We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
isNewRepo
1 parent e1f18ca commit 12c7c07Copy full SHA for 12c7c07
index.ts
@@ -459,6 +459,11 @@ export const canUserEditOrganization = (): boolean => isOrganizationProfile() &&
459
460
export const canUserEditRepo = (): boolean => isRepo() && exists('.reponav-item[href$="/settings"], [data-tab-item="settings-tab"]');
461
462
+export const isNewRepo = (url: URL | Location = location): boolean => url.pathname === '/new';
463
+collect.set('isNewRepo', [
464
+ 'https://github.com/new',
465
+]);
466
+
467
/** Get the logged-in user’s username */
468
const getUsername = () => document.querySelector('meta[name="user-login"]')!.getAttribute('content')!;
469
0 commit comments