Skip to content

geopozo/changelogtxt-parser

Repository files navigation

Changelogtxt-parser

changelogtxt_small

Overview

Changelogtxt-parser is a python api, CLI, and github action for parsing and verifying a changelog.txt like this:

- An unreleased change

v0.2.0
- A change

v0.1.0
- A change
- Another change

How to Install

uv add changelogtxt-parser
# or
pip install changelogtxt-parser

Python API

import changelogtxt

x = changelogtxt.load(filename)

# object example
changelogtxt.dump(object)

CLI Examples

# lint
changelogtxt check-format

# verify version exists
changelogtxt get-tag v1.0.1

# add new change or version
changelogtxt update -t "v1.0.2" -m "Change"

# compare two git ref files
changelogtxt summarize-news <origin> <target>

Basic action

- name: Check changelog
  uses: geopozo/changelogtxt-parser@main
  with:
    # Python version to use (default: 3.12)
    python-version: ""

    # Path to the changelog file (default: searches ./CHANGELOG.txt)
    file-path: ""

    # Whether to validate the changelog format (default: "true")
    check-format: "true"

    # Tag to verify. Use "from-push" to get the tag from the latest push
    get-tag: "v1.0.0"

    # Compare changelog files from the current ref to <target_ref>
    # (branch, commit hash, or tag)
    # <file_path> is relative to the `working-directory`
    summarize-news: '["<file_path>", "<target_ref>"]'

License

This project is licensed under the terms of the MIT license.

About

A parser for CHANGELOG.txt

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages