dev-master
9999999-devFormat changelog-like git logs
The Development Requires
0.0.1
0.0.1.0Format changelog-like git logs
The Development Requires
Wallogit.com
2017 © Pedro Peláez
Format changelog-like git logs
A convenience package to get formatted versions of the output of git log --oneline., (*2)
This is part of what powers the changelogs in the messages from Violinist.io., (*3)
composer require violinist-dev/git-log-format
Somehow get a string output from a git log. A command line way to do so is the following:, (*4)
git log abababa..fefefef --oneline
In the above example, abababa and fefefef are both hashes in the commit history., (*5)
The output would be somewhat like this:, (*6)
fefefef Fix bugs and add tests cdcdcdc Release features and probably introduce bugs
Then, pass the output to this package:, (*7)
$data = \Violinist\GitLogFormat\ChangeLogData::createFromString('fefefef Fix bugs and add tests
cdcdcdc Release features and probably introduce bugs');
// Now add some info about what the source of the log is. Like so:
$data->setGitSource('https://github.com/myname/mypackage');
// Then get convenient output back, with links to the actual commits:
print $data->getAsMarkdown();
// Prints:
// - [fefefef](https://github.com/myname/mypackage/commit/fefefef) `Fix bugs and add tests`
// - [cdcdcdc](https://github.com/myname/mypackage/commit/cdcdcdc) `Release features and probably introduce bugs`
Format changelog-like git logs
Format changelog-like git logs