@@ -4,7 +4,7 @@ import {createTippy, showTemporaryTooltip} from '../modules/tippy.ts';
4
4
import { hideElem , showElem , toggleElem } from '../utils/dom.ts' ;
5
5
import { setFileFolding } from './file-fold.ts' ;
6
6
import { ComboMarkdownEditor , getComboMarkdownEditor , initComboMarkdownEditor } from './comp/ComboMarkdownEditor.ts' ;
7
- import { toAbsoluteUrl } from '../utils.ts' ;
7
+ import { parseIssuePageInfo , toAbsoluteUrl } from '../utils.ts' ;
8
8
import { GET , POST } from '../modules/fetch.ts' ;
9
9
import { showErrorToast } from '../modules/toast.ts' ;
10
10
import { initRepoIssueSidebar } from './repo-issue-sidebar.ts' ;
@@ -57,13 +57,11 @@ function excludeLabel(item) {
57
57
}
58
58
59
59
export function initRepoIssueSidebarList ( ) {
60
- const repolink = $ ( '#repolink' ) . val ( ) ;
61
- const repoId = $ ( '#repoId' ) . val ( ) ;
60
+ const issuePageInfo = parseIssuePageInfo ( ) ;
62
61
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 } ` ;
65
63
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 } ` ;
67
65
}
68
66
$ ( '#new-dependency-drop-list' )
69
67
. dropdown ( {
0 commit comments