Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

:octocat: Provides a command line tool that generates a changelog based on titles of pull requests merged between specified references.

License

Notifications You must be signed in to change notification settings

ergebnis/github-changelog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6281aa4 Â· Aug 9, 2015
Aug 9, 2015
Aug 9, 2015
Aug 9, 2015
May 27, 2015
Feb 24, 2015
Feb 24, 2015
Aug 9, 2015
May 27, 2015
May 27, 2015
Aug 9, 2015
Aug 9, 2015
Aug 9, 2015
Aug 9, 2015
Feb 25, 2015

Repository files navigation

README

Build Status Code Climate Test Coverage Dependency Status

CLI Tool

Global installation

Install globally:

$ composer global require localheinz/github-changelog

Create your changelogs anywhere:

$ github-changelog pull-request 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)

Local installation

Install locally:

$ composer require --dev --sort-packages localheinz/github-changelog

Create your changelog from within in your project:

$ vendor/bin/github-changelog pull-request 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)

Userland Code

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\Entity;
use Localheinz\GitHub\ChangeLog\Repository;

$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())
);

$pullRequests = $repository->items(
    'localheinz',
    'github-changelog',
    '0.1.1',
    '0.1.2'
);

array_walk($pullRequests, function (Entity\PullRequest $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)

Hints

💡 You can use anything for a reference, e.g., a tag, a branch, a commit!

About

:octocat: Provides a command line tool that generates a changelog based on titles of pull requests merged between specified references.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published