@@ -4,7 +4,7 @@ import {createTippy, showTemporaryTooltip} from '../modules/tippy.ts';
44import { hideElem , showElem , toggleElem } from '../utils/dom.ts' ;
55import { setFileFolding } from './file-fold.ts' ;
66import { ComboMarkdownEditor , getComboMarkdownEditor , initComboMarkdownEditor } from './comp/ComboMarkdownEditor.ts' ;
7- import { toAbsoluteUrl } from '../utils.ts' ;
7+ import { parseIssuePageInfo , toAbsoluteUrl } from '../utils.ts' ;
88import { GET , POST } from '../modules/fetch.ts' ;
99import { showErrorToast } from '../modules/toast.ts' ;
1010import { initRepoIssueSidebar } from './repo-issue-sidebar.ts' ;
@@ -57,13 +57,11 @@ function excludeLabel(item) {
5757}
5858
5959export function initRepoIssueSidebarList ( ) {
60- const repolink = $ ( '#repolink' ) . val ( ) ;
61- const repoId = $ ( '#repoId' ) . val ( ) ;
60+ const issuePageInfo = parseIssuePageInfo ( ) ;
6261 const crossRepoSearch = $ ( '#crossRepoSearch' ) . val ( ) ;
63- const tp = $ ( '#type' ) . val ( ) ;
64- let issueSearchUrl = `${ appSubUrl } /${ repolink } /issues/search?q={query}&type=${ tp } ` ;
62+ let issueSearchUrl = `${ issuePageInfo . repoLink } /issues/search?q={query}&type=${ issuePageInfo . issueDependencySearchType } ` ;
6563 if ( crossRepoSearch === 'true' ) {
66- issueSearchUrl = `${ appSubUrl } /issues/search?q={query}&priority_repo_id=${ repoId } &type=${ tp } ` ;
64+ issueSearchUrl = `${ appSubUrl } /issues/search?q={query}&priority_repo_id=${ issuePageInfo . repoId } &type=${ issuePageInfo . issueDependencySearchType } ` ;
6765 }
6866 $ ( '#new-dependency-drop-list' )
6967 . dropdown ( {
0 commit comments