File tree Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export class GitHubIssueAddCommentEnhancer implements CommentEnhancer<GitHubIssu
4242 const slug = `${ owner } /${ repo } `
4343 const number = parseInt ( numberStr ! , 10 )
4444 const unique_key = `github.com:${ slug } :${ number } `
45- const title = document . querySelector ( 'main h1' ) ! . textContent . replace ( / # \d + $ / , '' ) . trim ( )
45+ const title = document . querySelector ( 'main h1' ) ! . textContent . replace ( / \s * # \d + $ / , '' ) . trim ( )
4646 return {
4747 domain : location . host ,
4848 number,
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export class GitHubPRAddCommentEnhancer implements CommentEnhancer<GitHubPRAddCo
3838 const slug = `${ owner } /${ repo } `
3939 const number = parseInt ( numberStr ! , 10 )
4040 const unique_key = `github.com:${ slug } :${ number } `
41- const title = 'TODO_TITLE'
41+ const title = document . querySelector ( 'main h1' ) ! . textContent . replace ( / \s * # \d + $ / , '' ) . trim ( )
4242 return {
4343 domain : location . host ,
4444 number,
@@ -70,7 +70,7 @@ export class GitHubPRAddCommentEnhancer implements CommentEnhancer<GitHubPRAddCo
7070 )
7171 }
7272
73- tableTitle ( _spot : GitHubPRAddCommentSpot ) : string {
74- return 'TITLE_TODO'
73+ tableTitle ( spot : GitHubPRAddCommentSpot ) : string {
74+ return spot . title
7575 }
7676}
Original file line number Diff line number Diff line change @@ -48,11 +48,13 @@ describe('github', () => {
4848 "domain": "github.com",
4949 "number": 517,
5050 "slug": "diffplug/selfie",
51- "title": "TODO_TITLE",
51+ "title": "Add "VCR" functionality
52+ #517",
5253 "type": "GH_PR_ADD_COMMENT",
5354 "unique_key": "github.com:diffplug/selfie:517",
5455 },
55- "title": "TITLE_TODO",
56+ "title": "Add "VCR" functionality
57+ #517",
5658 "upperDecoration": <React.Fragment>
5759 <span
5860 className="font-mono text-muted-foreground text-sm"
@@ -273,11 +275,15 @@ describe('github', () => {
273275 "domain": "github.com",
274276 "number": 58,
275277 "slug": "diffplug/gitcasso",
276- "title": "TODO_TITLE",
278+ "title": "Feat/expand corpus
279+
280+ #58",
277281 "type": "GH_PR_ADD_COMMENT",
278282 "unique_key": "github.com:diffplug/gitcasso:58",
279283 },
280- "title": "TITLE_TODO",
284+ "title": "Feat/expand corpus
285+
286+ #58",
281287 "upperDecoration": <React.Fragment>
282288 <span
283289 className="font-mono text-muted-foreground text-sm"
You can’t perform that action at this time.
0 commit comments