MCPcopy Index your code
hub / github.com/refined-github/refined-github / getResolvedText

Function getResolvedText

source/features/netiquette.tsx:57–72  ·  view source on GitHub ↗
(closingDate: Date)

Source from the content-addressed store, hash-verified

55}
56
57export 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
74function addResolvedBanner(commentField: HTMLElement, closingDate: Date): void {
75 if (elementExists('.rgh-resolved-banner')) {

Callers 2

addConversationBannerFunction · 0.85
addResolvedBannerFunction · 0.85

Calls 3

buildRepoUrlFunction · 0.85
areIssuesEnabledFunction · 0.85
areDiscussionsEnabledFunction · 0.85

Tested by

no test coverage detected