Generate pretty release changelogs using the commit log and Github API.

Overview

zenstruck/changelog

CI

Generate pretty release changelogs using the commit log and Github API. Changelog entries are in the following format:

{short hash} {summary} (#{PR number}) by {author}, {co-author 1}, {co-author n}...

Some notes about the format:

  1. Currently, this format is hard-coded and can't be customized
  2. Merge commits are excluded
  3. PR number is only added if not already in the summary (and a PR exists for the commit)
  4. Author/Co-Author's are converted to Github username links if possible to take advantage of Github Release Avatar List

See an example of a release generated using this package.

Installation

To avoid dependency conflicts with this tool, it is recommended to install as an executable PHAR or install in your project (or globally) using the composer bin plugin.

PHAR

wget https://github.com/zenstruck/changelog/releases/latest/download/changelog.phar -O changelog && chmod +x changelog
mv changelog ~/bin # assumes ~/bin is in your PATH

Composer Bin Plugin

Requires the bamarni/composer-bin-plugin.

# locally in your project
composer bin changelog require zenstruck/changelog

# globally
composer global bin changelog require zenstruck/changelog

Configuration

The changelog binary should be executable either globally or via vendor/bin/changelog. For the remainder of this documentation, it is assumed this is available as changelog.

This tool requires a Github Personal Access Token to access the Github API. You can configure this in two ways:

  1. GITHUB_API_TOKEN environment variable (ie prefix changelog commands with GITHUB_API_TOKEN=your-token)
  2. Configure the token globally: changelog configure and follow the instructions to generate/save your token

Usage

Changelog Preview

Generate a changelog preview in your console:

# outputs changelog for "your/repository" from tag "v1.0.0" to branch "main"
changelog generate --repository=your/repository --from=v1.0.0 --to=main

# (no arguments), detects repository from current directory, from=last release on Github, to=default branch
changelog generate

# equivalent to above, "generate" is the "default command"
changelog

Run changelog generate --help to see full command documentation.

Create Release

Create (and optionally push) a release changelog (exclude --push to preview what the release will look like):

# generates changelog from v1.0.0 to main and creates v1.1.0 release on Github that has the changelog as the body
changelog release v1.1.0 --repository=your/repository --from=v1.0.0 --target=main --push

# detects repository from current directory, from=last release on Github, target=default branch
changelog release v1.1.0 --push

You can use semantic versioning keywords as the next version. The following example assumes your last release was v1.0.0.

changelog release bug --push # creates v1.0.1 release
changelog release feature --push # creates v1.1.0 release
changelog release major --push # creates v2.0.0 release

Run changelog release --help to see full command documentation.

Release Status Dashboard

Generate a simple dashboard for a Github organization showing package release statuses.

changelog dashboard my-org

# will ask for organization and give option to save as default.
# if saved, subsequent calls to the command will not require the organization argument
changelog dashboard
You might also like...
Package to fetch cryptocurrency price, market value, assets etc. using coincap API endpoints

cryptocap-pkg Package to fetch cryptocurrency price, market value, assets etc. using coincap API endpoints. This package was developed to work with co

DigitalOcean API v2 client for Symfony and API Platform

DigitalOcean Bundle for Symfony and API Platform DunglasDigitalOceanBundle allows using the DigitalOcean API from your Symfony and API Platform projec

This package is a simple API laravel wrapper for Pokemontcg with a sleek Model design for API routes and authentication.

This package is a simple API laravel wrapper for Pokemontcg with a sleek Model design for API routes and authentication.

Nexmo REST API client for PHP. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.

Client Library for PHP Support Notice This library and it's associated packages, nexmo/client and nexmo/client-core have transitioned into a "Maintena

OpenAI API Client is a component-oriented, extensible client library for the OpenAI API. It's designed to be faster and more memory efficient than traditional PHP libraries.

OpenAI API Client in PHP (community-maintained) This library is a component-oriented, extensible client library for the OpenAI API. It's designed to b

API SDK for OpenTrade Commerce API: Taobao, Alibaba, JD, 1688, Aliexpress, Ebay.

OtapiPhpClient Create Client $client = new OtClient($key, $secret, $lang); key (Access Key) secret (Secret for access key) language (2 symbol lang id

API client for ThePay - payment gate API
API client for ThePay - payment gate API

This is the official highly compatible public package of The Pay SDK which interacts with The Pay's REST API. To get started see examples below.

Code Quiz MonoRepo (API, API Client, App)

Code Quiz Welcome to the Code Quiz Open Source project from How To Code Well. This is an Open Source project that includes an API and an App for the d

It’s a bot using simple feature - jangan keseringan make (haram cok)

It’s a bot using simple feature - jangan keseringan make (haram cok)

Comments
  • feat(dashboard): add CI status column

    feat(dashboard): add CI status column

    +-------------------------------+------------ zenstruck ------------------+------------+------------+
    | Repository                    | Latest Release | Status                 | Changelog? |    CI?     |
    +-------------------------------+----------------+------------------------+------------+------------+
    | zenstruck/phpmyadmin-server   | v1.7.0         | up to date             |     ✔      |     ✔      |
    | zenstruck/schedule-bundle     | v1.5.0         | up to date             |     ✔      |     ✖      |
    | zenstruck/foundry             | v1.24.1        | unreleased commits (1) |     ✔      |     ✔      |
    | zenstruck/browser             | v1.2.0         | unreleased commits (4) |     ✔      |     ✖      |
    | zenstruck/callback            | v1.5.0         | up to date             |     ✔      |     ✔      |
    | zenstruck/mailer-test         | v1.1.0         | unreleased commits (1) |     ✔      | (disabled) |
    | zenstruck/messenger-test      | v1.5.1         | up to date             |     ✔      |     ✖      |
    | zenstruck/console-test        | v1.4.0         | up to date             |     ✔      |     ✖      |
    | zenstruck/collection          | none           | no releases            |     ✖      |     ✖      |
    | zenstruck/signed-url-bundle   | v0.1.0         | up to date             |     ✖      | (disabled) |
    | zenstruck/console-extra       | v1.1.0         | up to date             |     ✔      |     ✖      |
    | zenstruck/assert              | v1.2.0         | up to date             |     ✔      |     ✖      |
    | zenstruck/changelog           | v1.5.2         | up to date             |     ✔      |     ✔      |
    | zenstruck/twig-service-bundle | v1.0.0         | up to date             |     ✖      |     ✔      |
    | zenstruck/uri                 | v2.2.1         | up to date             |     ✔      |     ✔      |
    | zenstruck/redis               | v0.1.0         | unreleased commits (1) |     ✖      | (disabled) |
    | zenstruck/class-metadata      | v1.0.1         | up to date             |     ✖      |     ✔      |
    | zenstruck/dsn                 | v0.1.0         | unreleased commits (1) |     ✖      |     ✖      |
    | zenstruck/dimension           | v0.1.0         | unreleased commits (5) |     ✖      |     ✔      |
    | zenstruck/stream              | v1.0.0         | unreleased commits (1) |     ✖      |     ✔      |
    | zenstruck/temp-file           | v1.0.0         | unreleased commits (1) |     ✖      |     ✔      |
    +-------------------------------+----------------+------------------------+------------+------------+
    
    opened by kbond 0
  • GraphQL for coauthors

    GraphQL for coauthors

    Example Request for commit:

    {
      repository(owner: "zenstruck", name: "foundry") {
        object(oid: "06b24d44fb76c0ab32f055ffb8a964de3a44925d") {
          ... on Commit {
            authors(last: 100) {
              edges {
                node {
                  user {
                    login
                  }
                  email
                  name
                }
              }
            }
          }
        }
      }
    }
    

    Example Response:

    {
      "data": {
        "repository": {
          "object": {
            "authors": {
              "edges": [
                {
                  "node": {
                    "user": {
                      "login": "jordisala1991"
                    },
                    "email": "[email protected]",
                    "name": "Jordi Sala Morales"
                  }
                },
                {
                  "node": {
                    "user": {
                      "login": "kbond"
                    },
                    "email": "[email protected]",
                    "name": "Kevin Bond"
                  }
                }
              ]
            }
          }
        }
      }
    }
    

    Get users:

    $users = [];
    
    foreach ($json['data']['repository']['object']['authors']['edges'] ?? [] as $item) {
        $users[] = $item['node']['user']['login'] ?? $item['node']['name'] ?? $item['node']['email'];
    }
    
    opened by kbond 0
  • Multi-branches

    Multi-branches

    Currently, commands assume only one branch is maintained in a project: Github's default branch. For projects that maintain multiple branches (ie 1.x/2.x) this is a problem. Some general thoughts/ideas:

    • add --branch= option to these commands
    • error/ask if not set and multiple branches detected
    • how to detect? probably if the source has multiple branches, ask
    • will need to determine the proper --from #18 might help
    bug enhancement 
    opened by kbond 0
  • Use packagist for fetching organizations for dashboard

    Use packagist for fetching organizations for dashboard

    1. List package names for organization
    2. Get details about each package (ie https://repo.packagist.org/p2/zenstruck/foundry~dev.json)
    3. Exclude abandoned packages (ie https://repo.packagist.org/p2/zenstruck/governator~dev.json)
    4. Use source key to determine github repo (exclude if not github)
    5. Fetch github details for each package and format same as #5
    enhancement 
    opened by kbond 0
Releases(v1.7.3)
Owner
Kevin Bond
Kevin Bond
A simple PHP GitHub API client, Object Oriented, tested and documented.

PHP GitHub API A simple Object Oriented wrapper for GitHub API, written with PHP. Uses GitHub API v3 & supports GitHub API v4. The object API (v3) is

KNP Labs 2k Jan 7, 2023
PHP library for the GitHub API v3

GitHub API v3 - PHP Library Currently under construction. Overview Provides access to GitHub API v3 via an Object Oriented PHP library. The goal of th

Darren Rees 62 Jul 28, 2022
A GitHub API bridge for Laravel

Laravel GitHub Laravel GitHub was created by, and is maintained by Graham Campbell, and is a PHP GitHub API bridge for Laravel. It utilises my Laravel

Graham Campbell 547 Dec 30, 2022
Retrieve the GitHub Sponsors of a given user/organization.

Laravel GitHub Sponsors Retrieve the GitHub Sponsors of any user/organization and check if someone is sponsoring you. Installation composer require as

Astrotomic 7 Apr 27, 2022
GitHub Action to dynamically update CONTRIBUTORS file

Generate / Update CONTRIBUTORS File - GitHub Action This GitHub Action updates a CONTRIBUTORS file with the top contributors from the specified projec

minicli 86 Dec 21, 2022
A discord bot for creating github repo issues.

Discord Issue Bot A discord bot for creating github repo issues. Requires: php-zlib, php-json, mysql, composer Tested on: Ubuntu 20.04.3, PHP Version

null 1 Jan 20, 2022
Fanmade project using Twitter API and Marvel API.

Project Marvel Memories A fanmade project in PHP using API Twitter V2, Marvel API and Github action scheduler. What about? Posts a random cover with d

Julien SCHMITT 15 Dec 17, 2022
Generate changelog by php tool kite

action-php-template Template for GitHub action by php. Init Template please replace action-php-template to your project name. Example Workflow Create

null 2 Mar 2, 2022
A simple API documentation package for Laravel using OpenAPI and Redoc

Laravel Redoc Easily publish your API documentation using your OpenAPI document in your Laravel Application. Installation You can install this package

Steve McDougall 15 Dec 27, 2022