This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Build status

Project information

Description

Changelog generator based on milestone or tags for github.

Installation

Using pip

pip install loghub

Using conda

conda install loghub -c conda-forge

or

conda install loghub -c spyder-ide

Usage

loghub can be used to generate changelog based on milestones or on tags.

In projects where milestones are used to track a release we can use for example:

loghub spyder-ide/spyder --milestone v3.0

In projects where milestones are used to track chunks of work but not releases, we can use tags to get the changes after the latest release, for example:

loghub spyder-ide/spyder --since-tag v3.0.0b7

Or if loghub is used to generate old changelogs (or update changelogs), we can also use tags to limit the range , for example:

loghub spyder-ide/spyder --since-tag v3.0.0b7 --until-tag v3.0.0

For private repos, just add the username and password arguments, for example:

loghub spyder-ide/spyder --since-tag v3.0.0b7 --since-tag v3.0.0 --username <username> --password <password>

Or, just add the username and a password prompt will appear, for example:

loghub spyder-ide/spyder --since-tag v3.0.0b7 --since-tag v3.0.0 --username <username>

Or generate a Github access token and use that instead, for example:

loghub spyder-ide/spyder --since-tag v3.0.0b7 -until-tag v3.0.0 --token <token>

Important

Because of the Github API rate limitations it is advised to always use authentication by either access token or user and password.

Advanced Usage

Filter PR base branch

Pull requests to display can be filtered depending on the branch they were merge against (base branch):

loghub spyder-ide/spyder --branch 3.x

Filter issues/PRs by labels

To filter issues to display, we can use a regular expression:

loghub spyder-ide/spyder --issue-label-regex "Type.*" --milestone v3.1

This will filter all the issues that start with Type

The same can be done with PRs

loghub spyder-ide/spyder --pr-label-regex "<some-regex>" --milestone v3.1

Group issues by label

Issues displayed can be grouped by labels:

loghub spyder-ide/spyder --issue-label-group "Type-Bug" "Bugs Fixed" --issue-label-group "Type-Enhancement" "New Features" --milestone v3.1

This will result in issues being grouped in two sections with the headings Bugs Fixed and New Features respectively.

Output format

Loghub provides two formats:

  • *changelog*, which is the default and includes links to issues and PRs
  • *release*, which does not include links
loghub spyder-ide/spyder --milestone v3.1 --format release

Custom templates

Loghub uses Jinja2 templates to format the output. If the current template does not your needs, you can copy the default templates and create a new one and provide the path to it as:

loghub spyder-ide/spyder --milestone v3.1 --template <PATH_TO_TEMPLATE>

Detailed CLI arguments

usage: loghub [-h] [-m MILESTONE]
              [-ilg ISSUE_LABEL_GROUPS [ISSUE_LABEL_GROUPS ...]]
              [-ilr ISSUE_LABEL_REGEX] [-plr PR_LABEL_REGEX] [-st SINCE_TAG]
              [-ut UNTIL_TAG] [-b BRANCH] [-f OUTPUT_FORMAT]
              [--template TEMPLATE] [-u USERNAME] [-p PASSWORD] [-t TOKEN]
              repository

Script to print the list of issues and pull requests closed in a given
milestone, tag including additional filtering options.

positional arguments:
  repository            Repository name to generate the Changelog for, in the
                        form user/repo or org/repo (e.g. spyder-ide/spyder)

optional arguments:
  -h, --help
                        Show this help message and exit

  -u USERNAME, --username USERNAME
                        Github user name

  -p PASSWORD, --password PASSWORD
                        Github user password

  -t TOKEN, --token TOKEN
                        Github access token

  -m MILESTONE, --milestone MILESTONE
                        Github milestone to get issues and pull requests for

  -st SINCE_TAG, --since-tag SINCE_TAG
                        Github issues and pull requests since tag

  -ut UNTIL_TAG, --until-tag UNTIL_TAG
                        Github issues and pull requests until tag

  -ilg ISSUE_LABEL [TEXT TO PRINT], --issue-label-group ISSUE_LABEL [TEXT TO PRINT]
                        Groups the generated issues by the specified label.
                        This option takes 1 or 2 arguments, where the first one
                        is the label to match and the second one is the label
                        to print on the final output

  -ilr ISSUE_LABEL_REGEX, --issue-label-regex ISSUE_LABEL_REGEX
                        Label issue filter using a regular expression filter

  -plr PR_LABEL_REGEX, --pr-label-regex PR_LABEL_REGEX
                        Label pull requets filter using a regular expression
                        filter

  -b BRANCH, --branch BRANCH
                        Filter merged PRs on base branch

  -f OUTPUT_FORMAT, --format OUTPUT_FORMAT
                        Format for print, either 'changelog' (for Changelog.md
                        file) or 'release' (for the Github Releases page).
                        Default is 'changelog'. The 'release' option doesn't
                        generate Markdown hyperlinks.

  -te, --template TEMPLATE
                        Use a custom Jinja2 template file

Label utility CLI arguments

loghub includes an additional utility to get or update labels.

usage: loghub-labels [-h] [-u USERNAME] [-p PASSWORD] [-t TOKEN]
                     [-a [{get,update}]] [-f FILENAME]
                     repository

positional arguments:
  repository            Repository name to generate the Changelog for, in the
                        form user/repo or org/repo (e.g. spyder-ide/spyder)

optional arguments:
  -h, --help            show this help message and exit
  -u USERNAME, --username USERNAME
                        Github user name
  -p PASSWORD, --password PASSWORD
                        Github user password
  -t TOKEN, --token TOKEN
                        Github access token
  -a [{get,update}], --action [{get,update}]
                        Action to take
  -f FILENAME, --filename FILENAME
                        File for storing labels
Release History

Release History

0.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
loghub-0.2-py2.py3-none-any.whl (24.8 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Jan 31, 2017
loghub-0.2.tar.gz (18.8 kB) Copy SHA256 Checksum SHA256 Source Jan 31, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting