From 6ee3159f1277b353a04c7e2dec099ecc81ac9053 Mon Sep 17 00:00:00 2001 From: Akayiz Date: Wed, 6 Mar 2024 01:34:06 +0200 Subject: [PATCH] refactor: Enhanced UX with feedback messages --- release_notes_generator.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/release_notes_generator.cpp b/release_notes_generator.cpp index ffdbd55..adafed8 100644 --- a/release_notes_generator.cpp +++ b/release_notes_generator.cpp @@ -102,9 +102,11 @@ int main(int argc, char* argv[]){ } } catch (const exception& e) { - cout << e.what(); + cout << e.what() << endl; + return 0; } + cout << "Release notes generated successfully, check " + MARKDOWN_OUTPUT_FILE_NAME + " in the current directory" << endl; return 0; } @@ -303,7 +305,7 @@ string getNormalCommitsNotes(int commitTypeIndex) { FILE* pipe = _popen(commandToRetrieveCommitsMessages.c_str(), "r"); if (!pipe) { - throw runtime_error("Error: Unable to open pipe to read git log commmand output"); + throw runtime_error("Unable to open pipe to read git log commmand output"); } char buffer[150]; @@ -343,6 +345,8 @@ void generateReleaseNotes(Commits commit, OutputTypes outputType, ReleaseNoteMod } } + cout << "Generating release notes......." << endl; + string commandToRetrieveCommitsMessages; string currentCommitMessage; for (int i = 0; i < COMMIT_TYPES_COUNT; i++)