Skip to main content

Release Exporter

Banner

Blog: https://www.gollahalli.com/blog/export-your-github-and-gitlab-releases-as-a-changelog/

This CLI exports your project releases to a markdown based on keep a changelog and markdownlint and JSON, it currently supports GitHub and GitLab.

Install

pip install release-exporter

Or download this repository and type in the following in your terminal/cmd

python setup.py install

Usage

In your terminal/cmd, change to the folder where your repository is located and do the following:

rex --token <your token> markdown

That's it. You should see a CHANGELOG.md in your folder.

Advance Usage

Release exporter has the following options

Usage: rex [OPTIONS] COMMAND [ARGS]...

Options:
    --token TEXT      Token number if its a private repository.
    --url TEXT        URL of your repository. This is optional if your current
                    directory has .git folder with remote url.
    --location TEXT   Local location of your repository.
    --version
    --universal TEXT  Create a global settings file. Defaults to True.
    --help            Show this message and exit.

Commands:
    all       Creates change log for all formats.
    init      Creates .rex file.
    json      Creates JSON file.
    markdown  Creates markdown file.
    rst       Creates reStructuredText file.

If you don't have a repository on your computer, but you still want to generate a change log you can manually add your repository URL as follows:

rex markdown --token <your token> --url <your url>

If you have your repository in a different location and you are lazy (like me) to change into that directory, get the absolute path of your repository add it to the --location <location>.

rex --token <your token> --location <absolute path>

You can also export your releases to JSON file by just replacing markdown with json. The output looks something like this:

{
    "repositoryName": "release-exporter",
    "provider": "github.com",
    "owner": "akshaybabloo",
    "repoUrl": "https://github.com/akshaybabloo/release-exporter",
    "totalTags": 2,
    "data": [
        {
            "tagName": "Unreleased",
            "description": "",
            "createdAt": "",
            "compareUrl": "https://github.com/akshaybabloo/release-exporter/compare/1.0.1...HEAD"
        },
        {
            "tagName": "v1.0.1",
            "description": "### Added\n- Unreleased tag added to the template and GitHub\n- Unreleased tag added to GitHub\n\n### Fixed\n- Tag missing in GitHub JSON fixed\n- Tag missing in GitLab JSON fixed",
            "createdAt": "2018-01-16",
            "compareUrl": "https://github.com/akshaybabloo/release-exporter/compare/v1.0...v1.0.1"
        },
        {
            "tagName": "v1.0",
            "description": "Initial release.",
            "createdAt": "2018-01-15",
            "compareUrl": null
        }
    ]
}

Note: The Unreleased tag is not counted in totalTags.

Problems you might encounter

If you are using rex on your repository folder or if you are using --location you might get an error saying that there are duplicate keys, this is because sometimes the file .git/config has more than one [remote "origin"]. In such case, it is best to give the URL of your repository by giving --url <repo URL>.

Reference

Metadata

Release files for release-exporter 1.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for release-exporter 1.1.3
File Size Uploaded Provenance Actions
release_exporter-1.1.3.tar.gz 11.9 kB Without provenance Details for release_exporter-1.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for release-exporter 1.1.3
File Interpreter ABI Platform Actions
release_exporter-1.1.3-py3-none-any.whl Python 3 none any Details for release_exporter-1.1.3-py3-none-any.whl

Total release size: 26.2 kB

Release files / release_exporter-1.1.3.tar.gz

Download URL release_exporter-1.1.3.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f216461e09754c169d768b07181796f97c7145c1f34cf8956295436dc1fd7f6a
BLAKE2b-256 checksum
How to use checksums
7070c9ee721f07214a9d2a824a78ddf8295ce6a6ba93e8754c6bd006891724da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.13.3 Linux/6.11.0-1013-azure

Release files / release_exporter-1.1.3-py3-none-any.whl

Download URL release_exporter-1.1.3-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8faf8cac5c75fd1e2dab038c768460ef4f7756dc1d404742614b16bc5ff00ade
BLAKE2b-256 checksum
How to use checksums
8daf875d514038504e4bd5555e37833e36b637ca07f6becdd600f37521399400
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.13.3 Linux/6.11.0-1013-azure

Security for release-exporter 1.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page