Print a changelog from closed GitHub pull requests
A script that prints out a Markdown-formatted changelog snippet listing changes since the most recent release of a GitHub repo. The output is a list of closed pull requests since the repo’s last release, and follows http://keepachangelog.com/ conventions. You can copy the output, paste it into your changelog file, and then edit it.
$ unreleased hypothesis/client **** Changes since hypothesis/client v1.24.1: Please edit the output below before including it in the change log. See http://keepachangelog.com for further advice. Only include changes which are interesting to users of the package or application, and use a description they will be able to understand. **** ## [Unreleased] ### Changed - Multiple frame detection improvements ([#457](https://github.com/hypothesis/client/pull/457)). - Adding waitForFrameObserver in frame manipulation tests ([#469](https://github.com/hypothesis/client/pull/469)). - Allow "oauthEnabled" setting to be overridden in client config ([#470](https://github.com/hypothesis/client/pull/470)). - Replace selection tabs with view switcher (feature flagged) ([#465](https://github.com/hypothesis/client/pull/465)). - Convert Unicode service & tests to JS ([#475](https://github.com/hypothesis/client/pull/475)). - Set the visibleHighlights state for multiple Guests ([#467](https://github.com/hypothesis/client/pull/467)). - Frame destruction ([#472](https://github.com/hypothesis/client/pull/472)).
You can use xclip to copy the output directly into your clipboard instead of printing it to the terminal:
unreleased hypothesis/client | xclip -selection clipboard -i
- Python 3
pip install unreleased
Your current working directory must be the working tree of a local clone of the GitHub repo that you’re going to print a changelog for. You then provide the GitHub repo name as a command-line argument. For example to print changes for https://github.com/hypothesis/client since the most recent release, cd into your local https://github.com/hypothesis/client repo and run:
To print changes since version v1.24.1 instead, run:
unreleased hypothesis/client --tag v1.24.1
The version should be the name of a GitHub release of the repo.
For more options see unreleased --help.
How to release a new version of unreleased
You will need:
- A https://pypi.python.org/ account that has the necessary permissions on the PyPI package for unreleased
- A .pypirc file containing your PyPI account credentials
To publish a new release:
Commit your new changes to git
Increment the version number in version.py
Commit the version number change: git commit unreleased/version.py -m "Bump version number"
Build the source and binary releases:
python setup.py sdist python setup.py bdist_wheel
Upload the releases to PyPI:
twine upload dist/*
That’s it! The PyPI package page should now show your new version, and existing users can upgrade to it by running pip install --upgrade unreleased.
|Filename, size & hash||File type||Python version||Upload date|
|unreleased-0.1.0-py2-none-any.whl (7.8 kB) View hashes||Wheel||py2|
|unreleased-0.1.0.tar.gz (6.0 kB) View hashes||Source||None|
Hashes for unreleased-0.1.0-py2-none-any.whl