MCPcopy Create free account
hub / github.com/electron/clerk / createPRCommentFromNotes

Function createPRCommentFromNotes

src/note-utils.ts:79–92  ·  view source on GitHub ↗
(releaseNotes: string | null)

Source from the content-addressed store, hash-verified

77];
78
79export const createPRCommentFromNotes = (releaseNotes: string | null) => {
80 let body = constants.NO_NOTES_BODY;
81 if (releaseNotes && !OMIT_FROM_RELEASE_NOTES_KEYS.some((rx) => rx.test(releaseNotes))) {
82 const splitNotes = releaseNotes.split('\n').filter((line) => line !== '');
83 if (splitNotes.length > 0) {
84 const quoted = splitNotes.map((line) => `> ${line}`).join('\n');
85 body = `${constants.NOTES_LEAD}\n\n${quoted}`;
86 }
87 }
88
89 debug(`Created PR comment from releaseNotes: ${body}`);
90
91 return body;
92};

Callers 2

note.test.tsFile · 0.90
submitFeedbackForPRFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected