Skip to content

Commit

Permalink
releases-tab - Mention that it requires a token (refined-github#7275)
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante authored Feb 24, 2024
1 parent 35d6d22 commit 5e2f132
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/features/releases-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {buildRepoURL, cacheByRepo, getRepo, triggerRepoNavOverflow} from '../git
import {appendBefore} from '../helpers/dom-utils.js';
import {repoUnderlineNavUl, repoUnderlineNavDropdownUl} from '../github-helpers/selectors.js';
import GetReleasesCount from './releases-tab.gql';
import {expectToken} from '../github-helpers/github-token.js';

function detachHighlightFromCodeTab(codeTab: HTMLAnchorElement): void {
codeTab.dataset.selectedLinks = codeTab.dataset.selectedLinks!.replace('repo_releases ', '');
Expand Down Expand Up @@ -101,6 +102,7 @@ async function addReleasesDropdownItem(dropdownMenu: HTMLElement): Promise<false
}

async function init(signal: AbortSignal): Promise<void> {
await expectToken();
observe(repoUnderlineNavUl, addReleasesTab, {signal});
observe(repoUnderlineNavDropdownUl, addReleasesDropdownItem, {signal});
observe(['[data-menu-item="i0code-tab"] a', 'a#code-tab'], detachHighlightFromCodeTab, {signal});
Expand Down

0 comments on commit 5e2f132

Please sign in to comment.