MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / run

Function run

scripts/generate-changelog.ts:218–252  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

216// ============================================================================
217
218function run(): void {
219 const changelogPath = join(__dirname, '..', 'CHANGELOG.md');
220 const changelogContent = readFileSync(changelogPath, 'utf-8');
221 const unreleasedLines = getUnreleasedSection(changelogContent);
222
223 // Parse existing changelog entries
224 const { importantChanges, otherChanges, internalChanges, changelogPRs, contributorsLine } =
225 parseChangelog(unreleasedLines);
226
227 // Add new git commits that aren't already in the changelog
228 for (const commit of getNewGitCommits()) {
229 const prNumber = extractPRNumber(commit);
230
231 // Skip duplicates
232 if (prNumber && changelogPRs.has(prNumber)) {
233 continue;
234 }
235
236 const entry = createEntry(commit, isInternalCommit(commit) ? 'internal' : 'other');
237
238 if (entry.type === 'internal') {
239 internalChanges.push(entry);
240 } else {
241 otherChanges.push(entry);
242 }
243 }
244
245 // Sort all categories
246 sortEntries(importantChanges);
247 sortEntries(otherChanges);
248 sortEntries(internalChanges);
249
250 // eslint-disable-next-line no-console
251 console.log(generateOutput(importantChanges, otherChanges, internalChanges, contributorsLine));
252}
253
254// ============================================================================
255// Helper Functions

Callers 1

Calls 12

joinFunction · 0.90
getNewGitCommitsFunction · 0.90
getUnreleasedSectionFunction · 0.85
parseChangelogFunction · 0.85
extractPRNumberFunction · 0.85
createEntryFunction · 0.85
isInternalCommitFunction · 0.85
sortEntriesFunction · 0.85
generateOutputFunction · 0.85
pushMethod · 0.80
hasMethod · 0.65
logMethod · 0.65

Tested by

no test coverage detected