@@ -45,6 +45,43 @@ export class GitHubIssueAppendEnhancer
4545 return null
4646 }
4747
48+ // Check for project URLs with issue parameter first
49+ const isProjectView = location . pathname . match (
50+ / ^ \/ (?: o r g s | u s e r s ) \/ [ ^ / ] + \/ p r o j e c t s \/ \d + \/ v i e w s \/ \d + /
51+ )
52+ if ( isProjectView ) {
53+ const params = new URLSearchParams ( location . search )
54+ const issueParam = params . get ( "issue" )
55+ // Only match textareas within Shared-module__CommentBox (those are for adding new comments)
56+ const isInCommentBox = textarea . closest (
57+ '[class*="Shared-module__CommentBox"]'
58+ )
59+ if ( issueParam && isInCommentBox ) {
60+ // Parse issue parameter: "owner|repo|number" (URL encoded as owner%7Crepo%7Cnumber)
61+ const parts = issueParam . split ( "|" )
62+ if ( parts . length === 3 ) {
63+ const [ owner , repo , numberStr ] = parts
64+ const slug = `${ owner } /${ repo } `
65+ const number = parseInt ( numberStr ! , 10 )
66+ const unique_key = `github.com:${ slug } :${ number } `
67+ // For project views, the title is in the side panel dialog
68+ const title =
69+ document
70+ . querySelector ( '[data-testid="issue-title"]' )
71+ ?. textContent ?. trim ( ) || ""
72+ return {
73+ domain : location . host ,
74+ number,
75+ slug,
76+ title,
77+ type : GH_ISSUE_APPEND ,
78+ unique_key,
79+ }
80+ }
81+ }
82+ return null
83+ }
84+
4885 // Parse GitHub URL structure: /owner/repo/issues/123 or /owner/repo/pull/456
4986 logger . debug ( `${ this . constructor . name } examing url` , location . pathname )
5087
0 commit comments