Skip to content

Commit

Permalink
refactor: Enhanced UX with feedback messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmed-Khaled-dev committed Mar 5, 2024
1 parent 4dd70cc commit 6ee3159
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions release_notes_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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++)
Expand Down

0 comments on commit 6ee3159

Please sign in to comment.