Install globally:
$ composer global require localheinz/github-changelog
Create your changelogs anywhere:
$ github-changelog generate localheinz github-changelog 0.1.1 0.1.2
Enjoy the changelog:
- Fix: Catch exceptions in command (#37)
- Fix: Request 250 instead of 30 commits (#38)
Install locally:
$ composer require --dev --sort-packages localheinz/github-changelog
Create your changelog from within in your project:
$ vendor/bin/github-changelog generate localheinz github-changelog ae63248 master
Enjoy the changelog:
- Enhancement: Create ChangeLog command (#31)
- Fix: Assert exit code is set to 0 (#32)
- Enhancement: Add console application (#33)
- Fix: Readme (#34)
- Fix: Autoloading for console script (#35)
- Fix: Version foo with rebasing and whatnot (#36)
- Fix: Catch exceptions in command (#37)
- Fix: Request 250 instead of 30 commits (#38)
Install locally:
$ composer require --sort-packages localheinz/github-changelog
Retrieve pull requests between references in your application:
<?php
require 'vendor/autoload.php';
use Github\Client;
use Github\HttpClient\CachedHttpClient;
use Localheinz\GitHub\ChangeLog\Repository;
use Localheinz\GitHub\ChangeLog\Resource;
$client = new Client(new CachedHttpClient());
$client->authenticate(
'your-token-here',
Client::AUTH_HTTP_TOKEN
);
$repository = new Repository\PullRequestRepository(
$client->pullRequests(),
new Repository\CommitRepository($client->repositories()->commits())
);
/* @var Resource\RangeInterface $range */
$range = $repository->items(
'localheinz',
'github-changelog',
'0.1.1',
'0.1.2'
);
$pullRequests = $range->pullRequests();
array_walk($pullRequests, function (Resource\PullRequestInterface $pullRequest) {
echo sprintf(
'- %s (#%s)' . PHP_EOL,
$pullRequest->title(),
$pullRequest->id()
);
});
Enjoy the changelog:
- Fix: Catch exceptions in command (#37)
- Fix: Request 250 instead of 30 commits (#38)
💡 You can use anything for a reference, e.g., a tag, a branch, a commit!
Please have a look at CONTRIBUTING.md
.
This package is licensed using the MIT License.