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

Function addDraftBanner

source/features/netiquette.tsx:115–125  ·  view source on GitHub ↗
(commentField: HTMLElement)

Source from the content-addressed store, hash-verified

113}
114
115function addDraftBanner(commentField: HTMLElement): void {
116 commentField.prepend(
117 createBanner({
118 icon: <GitPullRequestDraftIcon className="m-0 tmp-m-0" />,
119 classes: 'p-2 my-2 mx-md-2 text-small color-fg-muted border-0'.split(' '),
120 text: <>
121 This is a <strong>draft PR</strong>, it might not be ready for review.
122 </>,
123 }),
124 );
125}
126
127function initDraft(signal: AbortSignal): void {
128 observe(newCommentField, addDraftBanner, {signal});

Callers

nothing calls this directly

Calls 2

createBannerFunction · 0.85
prependMethod · 0.80

Tested by

no test coverage detected