(closingDate: Date)
| 55 | } |
| 56 | |
| 57 | export function getResolvedText(closingDate: Date): JSX.Element { |
| 58 | const ago = <strong>{twas(closingDate.getTime())}</strong>; |
| 59 | const newIssue = <a href={buildRepoUrl('issues/new/choose')}>new issue</a>; |
| 60 | const newDiscussion = <a href={buildRepoUrl('discussions/new/choose')}>new discussion</a>; |
| 61 | const whatToOpen = areIssuesEnabled() && areDiscussionsEnabled() |
| 62 | ? <>{' '}{newIssue} or a {newDiscussion}{' '}</> |
| 63 | : areIssuesEnabled() |
| 64 | ? newIssue |
| 65 | : newDiscussion; |
| 66 | return ( |
| 67 | <> |
| 68 | This {pageDetect.isPR() ? 'PR' : 'issue'} was closed {ago}. Please consider opening a {whatToOpen}{' '} |
| 69 | instead of leaving a comment here. |
| 70 | </> |
| 71 | ); |
| 72 | } |
| 73 | |
| 74 | function addResolvedBanner(commentField: HTMLElement, closingDate: Date): void { |
| 75 | if (elementExists('.rgh-resolved-banner')) { |
no test coverage detected