MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / main

Function main

utils/scripts/generate-release-notes.js:223–247  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

221}
222
223async function main() {
224 log(`🔍 Generating release notes for ${owner}/${repo} @ ${currentTag}...`);
225
226 const prevTag = flags.fromTag || (await getPreviousTag());
227 if (!prevTag) {
228 console.error("No previous tag found. Use --from-tag to specify one.");
229 process.exit(1);
230 }
231
232 const commits = await getCommits(prevTag, currentTag);
233 if (!commits.length) {
234 console.error("No commits found.");
235 process.exit(1);
236 }
237 const categorized = categorizeCommits(commits, flags);
238 let output;
239
240 if (flags.format === "json") {
241 output = formatJSON(currentTag, prevTag, categorized);
242 } else {
243 output = formatMarkdown(currentTag, prevTag, categorized, flags);
244 }
245
246 process.stdout.write(output + "\n");
247}
248
249main().catch((err) => console.error(err));

Callers 1

Calls 9

getPreviousTagFunction · 0.85
getCommitsFunction · 0.85
categorizeCommitsFunction · 0.85
formatJSONFunction · 0.85
formatMarkdownFunction · 0.85
exitMethod · 0.80
logFunction · 0.70
writeMethod · 0.65
errorMethod · 0.45

Tested by

no test coverage detected