fix: resolve PR title

This commit is contained in:
EnixCoda 2020-11-13 13:53:00 +08:00
parent 6789fe6a11
commit ab322e95d7
No known key found for this signature in database
GPG key ID: 0C1A07377913A1DD

View file

@ -19,9 +19,8 @@ export function isInCodePage() {
}
export function getIssueTitle() {
const title = $('.gh-header-title .js-issue-title')?.textContent
const id = $('.gh-header-title .gh-header-number')?.textContent
if (title && id) return `${id} ${title}`
const title: string | undefined = $('.gh-header-title')?.textContent
return title?.trim().replace(/\n/g, '')
}
export function getCurrentBranch() {