@@ -4,24 +4,24 @@ import { logger } from '../../logger'
44import { modifyDOM } from '../modifyDOM'
55import { commonGithubOptions , prepareGitHubHighlighter } from './github-common'
66
7- const GH_ISSUE_NEW = 'GH_ISSUE_NEW ' as const
7+ const GH_ISSUE_CREATE = 'GH_ISSUE_CREATE ' as const
88
9- interface GitHubIssueNewSpot extends CommentSpot {
10- type : typeof GH_ISSUE_NEW
9+ interface GitHubIssueCreateSpot extends CommentSpot {
10+ type : typeof GH_ISSUE_CREATE
1111 domain : string
1212 slug : string // owner/repo
1313 title : string
1414}
1515
16- export class GitHubIssueNewEnhancer implements CommentEnhancer < GitHubIssueNewSpot > {
16+ export class GitHubIssueCreateEnhancer implements CommentEnhancer < GitHubIssueCreateSpot > {
1717 forSpotTypes ( ) : string [ ] {
18- return [ GH_ISSUE_NEW ]
18+ return [ GH_ISSUE_CREATE ]
1919 }
2020
2121 tryToEnhance (
2222 textarea : HTMLTextAreaElement ,
2323 location : StrippedLocation ,
24- ) : GitHubIssueNewSpot | null {
24+ ) : GitHubIssueCreateSpot | null {
2525 if ( textarea . id === 'feedback' ) {
2626 return null
2727 }
@@ -45,12 +45,12 @@ export class GitHubIssueNewEnhancer implements CommentEnhancer<GitHubIssueNewSpo
4545 domain : location . host ,
4646 slug,
4747 title,
48- type : GH_ISSUE_NEW ,
48+ type : GH_ISSUE_CREATE ,
4949 unique_key,
5050 }
5151 }
5252
53- enhance ( textArea : HTMLTextAreaElement , _spot : GitHubIssueNewSpot ) : OverTypeInstance {
53+ enhance ( textArea : HTMLTextAreaElement , _spot : GitHubIssueCreateSpot ) : OverTypeInstance {
5454 prepareGitHubHighlighter ( )
5555 const overtypeContainer = modifyDOM ( textArea )
5656 return new OverType ( overtypeContainer , {
@@ -60,7 +60,7 @@ export class GitHubIssueNewEnhancer implements CommentEnhancer<GitHubIssueNewSpo
6060 } ) [ 0 ] !
6161 }
6262
63- tableUpperDecoration ( spot : GitHubIssueNewSpot ) : React . ReactNode {
63+ tableUpperDecoration ( spot : GitHubIssueCreateSpot ) : React . ReactNode {
6464 const { slug } = spot
6565 return (
6666 < >
@@ -70,11 +70,11 @@ export class GitHubIssueNewEnhancer implements CommentEnhancer<GitHubIssueNewSpo
7070 )
7171 }
7272
73- tableTitle ( spot : GitHubIssueNewSpot ) : string {
73+ tableTitle ( spot : GitHubIssueCreateSpot ) : string {
7474 return spot . title || 'New Issue'
7575 }
7676
77- buildUrl ( spot : GitHubIssueNewSpot ) : string {
77+ buildUrl ( spot : GitHubIssueCreateSpot ) : string {
7878 return `https://${ spot . domain } /${ spot . slug } /issue/new`
7979 }
8080}
0 commit comments