Code Monkey home page Code Monkey logo

changelog_generator's Introduction

changelog_generator.php

This project provides a simple way to create a markdown ordered list of issues and pull requests closed with a given milestone on GitHub. It uses Zend Framework's Zend\Http component to communicate with the GitHub API, and Zend\Console\Getopt to handle CLI options parsing.

The script ensures that any special characters that might break the generated links are scrubbed and substituted with the corresponding HTML entities; as such, the script should be generally usable unattended.

Installation

Use Composer to install dependencies:

php /path/to/composer.phar install

Alternately, you can compose it into an existing PHP application using Composer. Add the following to your composer.json:

{
    "require": {
        "phly/changelog-generator": "*"
    }
}

and either perform a composer.phar install or composer.phar update. This will install the script in vendor/bin/changelog_generator.php.

Usage

There are two primary ways to use the generator:

  • Use CLI options to pass in configuration
  • Create a configuration file, and pass that to the script

The standard CLI options are:

  • -t or --token, to pass your GitHub API token
  • -u or --user, to pass your GitHub username or organization
  • -r or --repo, to pass your GitHub repository name
  • -m or --milestone, to pass the identifier of the GitHub milestone for which to generate the changelog

As an example:

vendor/bin/changelog_generator.php -t MYgithubAPItoken -u weierophinney -r changelog_generator -m 1 > changelog.md

Alternately, create a configuration file. You can use config/config.php.dist as a template; it simply needs to return an array with the keys "token", "user", "repo", and "milestone". You then pass this to the script:

vendor/bin/changelog_generator.php -c path/to/config.php

You can also mix-and-match options -- for instance, you might place your token in a configuration file, and then pass the other options via CLI.

changelog_generator's People

Contributors

joshribakoff avatar ocramius avatar weierophinney avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.