From 5a687cb9f5d2fce4336402f9515c421558237c6d Mon Sep 17 00:00:00 2001 From: EnixCoda Date: Sat, 17 Jan 2026 21:22:22 +0800 Subject: [PATCH] fix: resolve pull request meta (title without id) --- src/platforms/GitHub/DOMHelper.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/platforms/GitHub/DOMHelper.ts b/src/platforms/GitHub/DOMHelper.ts index e25e2f1..ebe91e5 100644 --- a/src/platforms/GitHub/DOMHelper.ts +++ b/src/platforms/GitHub/DOMHelper.ts @@ -151,12 +151,15 @@ export function isInPullFilesPage() { } export function getIssueTitle() { - const title = $( - [ - '.gh-header-title .markdown-title', // exclude issue ID from title - '.gh-header-title', - '[data-component="TitleArea"] [data-component="PH_Title"]', // PR new experience title - ].join(), + const titleContainerSelectors = [ + '[data-component="TitleArea"] [data-component="PH_Title"]', // PR new experience title + '.gh-header-title', + ] + const title = ( + $( + // exclude issue ID from title + titleContainerSelectors.map(selector => `${selector} .markdown-title`).join(), + ) ?? $(titleContainerSelectors.join()) )?.textContent return title?.trim().replace(/\n/g, '') }