This commit is contained in:
2025-12-14 01:31:06 +00:00
parent 106b72748c
commit 48c4b0c9b2
6 changed files with 407 additions and 8 deletions

View File

@@ -14,6 +14,8 @@ interface ICommitSummary {
commitSha?: string;
pushed: boolean;
repoUrl?: string;
released?: boolean;
releasedRegistries?: string[];
}
interface IRecommendation {
@@ -146,6 +148,13 @@ export function printSummary(summary: ICommitSummary): void {
lines.push(`Remote: ⊘ Not pushed (local only)`);
}
if (summary.released && summary.releasedRegistries && summary.releasedRegistries.length > 0) {
lines.push(`Published: ✓ Released to ${summary.releasedRegistries.length} registr${summary.releasedRegistries.length === 1 ? 'y' : 'ies'}`);
summary.releasedRegistries.forEach((registry) => {
lines.push(`${registry}`);
});
}
if (summary.repoUrl && summary.commitSha) {
lines.push('');
lines.push(`View at: ${summary.repoUrl}/commit/${summary.commitSha}`);
@@ -153,7 +162,9 @@ export function printSummary(summary: ICommitSummary): void {
printSection('✅ Commit Summary', lines);
if (summary.pushed) {
if (summary.released) {
console.log('🎉 All done! Your changes are committed, pushed, and released.\n');
} else if (summary.pushed) {
console.log('🎉 All done! Your changes are committed and pushed.\n');
} else {
console.log('✓ Commit created successfully.\n');