diff --git a/CHANGELOG.md b/CHANGELOG.md index a8893f7..87e01d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Change Log ## [Unreleased] + +## [1.0.0] ### Removed - `IO\File` no longer does an `is_file()` check to allow for remote url fetching [#13](https://github.com/stevewest/changelog/issues/13). @@ -42,6 +44,7 @@ - Initial version. [Unreleased]: https://github.com/stevewest/changelog +[1.0.0]: https://github.com/stevewest/changelog/releases/tag/1.0.0 [0.4.0]: https://github.com/stevewest/changelog/releases/tag/0.4.0 [0.3.0]: https://github.com/stevewest/changelog/releases/tag/0.3.0 [0.2.0]: https://github.com/stevewest/changelog/releases/tag/0.2.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..2b8f922 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,49 @@ +# Contributing + +Contributions are awesome but to help things along please take a look at the following. + + - [Issues](#-issues) + - [Feature Requests](#-feature-requests) + - [Pull Requests](#-pull-requests) + +## Issues + +When opening an issue please make sure to include as much information as possible such as: + + - **things you have already tried** + - Have you tried the latest package version? (`dev-master`) + - Is there already a similar issue? + - PHP version + - Stack trace + - Sample code or data + +## Feature requests + +Feature requests can be either opened as an issue or you can contact me and ask for something. + +When you do think about what you are asking for, will others use it? Is it specific to your problem or not? + +## Pull requests + +These are always welcome, it's what open source software is all about. But please keep a few things in mind: + +### Follow the coding standard + +This package uses [PSR-2] with the exception that indentation should be `tab` characters, not `spaces` and that all `{` +should be on a new line. + +### Unit tests + +Any changes to the code should include updated or additional tests. +Please make sure that if a test relates to an issue there is an `@link` to show that. + +Any new features should have related tests in the same pull request. + +All tests must pass, nothing will be merged in if there are tests failing. + +### Code Quality + +While mostly a secondary concern code quality is still important. As a general rule of thumb make sure methods are not +too long or needlessly complex when they can be broken up, use a bit of common sense. + +[PSR-2]: http://www.php-fig.org/psr/psr-2/ diff --git a/README.md b/README.md index 8ec38f1..c0f1faf 100644 --- a/README.md +++ b/README.md @@ -6,18 +6,50 @@ [![HHVM](https://img.shields.io/hhvm/stevewest/changelog.svg?style=flat-square)](http://hhvm.h4cc.de/package/stevewest/changelog) [![Packagist](https://img.shields.io/packagist/v/stevewest/changelog.svg?style=flat-square)](https://packagist.org/packages/stevewest/changelog) -Package to enable change logs to be parsed into objects for manipulation in code. +Quickly and easily modify change logs from a variety of sources. -Eventually the package will be able to read change logs from a number of sources, be -able to convert those to an object structure to allow them to be modified easily and -then written out to a configured output. The output could be to a file on disk or -committed to a git repo. +Currently the package only supports the [KeepAChangeLog] format of change logs. -Everything is adaptor/driver based so multiple sources, parsers and outputs can be -used as desired. There are also plans for a cli script. +It is possible to read and write logs from/to: + + - File + - Url (no support for output) + - Native string + - GitHub repo via GitHub API + +Logs can be formatted into the [KeepAChangeLog] format, xml and json through the use of various render classes. ## Quick Examples +### Creating a log + +```php +setTitle('My Project Change Log'); +$log->setDescription('This is my project\'s change log. Any crazy stuff that happens will appear here.'); + +// Create and add a new release. +$release1 = new \ChangeLog\Release('1.0.0'); +$release1->addChange('Added', 'Awesome feature needed for release'); +$log->addRelease($release1); + +$release2 = new \ChangeLog\Release('0.3.0'); +$release2->addChange('Added', 'Finally added a change log'); +$release2->setChanges('Fixed', [ + 'Bug 1', + 'Bug 2', + 'Bug 3', +]); +$log->addRelease($release2); +``` + +**Note** releases are sorted in accordance to semantic visioning automatically with the latest release at the top. +It is expected that all release names follow this and the only exception to this is `unreleased` which will always be at +the top of the release list. + ### Parsing a log ```php @@ -76,3 +108,24 @@ $log1->mergeLog($log2); ``` Depending on your use case it might be useful to create an empty log first and merge other logs into that. + +## Development + +Current plans for development can be found in the repo's [issue tracker][issues]. +If you wish to request extra functionality then open an issue or pull request or give me a poke on [twitter] or anywhere +else you can find me. + +Feel free to report any issues on the [issue tracker][issues]. + +## Author + +### Steve "uru" West + + - [Twitter][twitter] + - [GitHub] + - Email: steven.david.west@gmail.com + +[KeepAChangeLog]: http://keepachangelog.com/ +[issues]: https://github.com/stevewest/changelog/issues +[twitter]: http://twitter.com/SteveUru +[GitHub]: https://github.com diff --git a/composer.json b/composer.json index 6ae406f..2ac1d96 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "license": "MIT", "authors": [ { - "name": "Steve West", + "name": "Steve \"uru\" West", "email": "steven.david.west@gmail.com" } ],