MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / main

Function main

scripts/generate-github-release-notes.mjs:176–197  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

174}
175
176async function main() {
177 try {
178 const { changelog, out, packageName, version } = parseArgs(process.argv.slice(2));
179 const changelogContent = await readFile(changelog, 'utf8').catch(() => {
180 throw new Error(`Could not read CHANGELOG.md at ${changelog}`);
181 });
182
183 const section = extractChangelogSection(changelogContent, version);
184 const body = buildReleaseBody(version, section, packageName);
185
186 if (out) {
187 await writeFile(out, body, 'utf8');
188 return;
189 }
190
191 process.stdout.write(body);
192 } catch (error) {
193 const message = error instanceof Error ? error.message : String(error);
194 process.stderr.write(`❌ ${message}\n`);
195 process.exit(1);
196 }
197}
198
199await main();

Calls 6

readFileFunction · 0.85
extractChangelogSectionFunction · 0.85
buildReleaseBodyFunction · 0.85
writeFileFunction · 0.85
parseArgsFunction · 0.70
writeMethod · 0.65

Tested by

no test coverage detected