We present a suggester of git commit messages based on the files diff: by reading the commit patch, the system outputs a message in natural language describing the subject of the commit. While high level intent guessing is out of the scope of this project, this may provide further insights to a CI system in refusing pull requests with poor commit messages or not explaining the subject matter.
When it comes to commit messages, we all have witnessed the worst of our kind: while code is (hopefully) carefully crafted, the urge to submit our work for peer review can play badly with the helpfulness of the commit message attached (leaving a helpless reviewer in the dark and calling for the developer presence to explain the meaning of the coded feature). Machine translation techniques come to the rescue, by providing a viable aid to suggesting better commit messages from a golden standard of various situations: by analyzing thousands of commit messages along with their patches, we show that a machine can understand the semantics of a patch thus providing a way to automatically tell good messages from bad messages. We can employ this in CI environments to rule out insufficiently documented patches or to propose better alternatives to the developers.
Speakers: Alberto Massidda