No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-04 22:42:33 +00:00
.forgejo/workflows Made workflow input actually do something 2026-08-05 00:41:38 +02:00
.fragcha Bumped version and updated changelog 2026-08-04 22:42:33 +00:00
fragcha docs: Added help text for all CLI flags 2026-08-04 23:42:48 +02:00
.gitignore chore: Added .gitignore 2026-08-01 01:25:15 +02:00
agpl-3.0.md chore: Added license 2026-08-03 01:58:23 +02:00
CHANGELOG.md Bumped version and updated changelog 2026-08-04 22:42:33 +00:00
fragcha.json5 build: Added forgejo action to run fragcha on the fragcha repository 2026-08-05 00:30:31 +02:00
LICENSE.md chore: Added license 2026-08-03 01:58:23 +02:00
pyproject.toml Bumped version and updated changelog 2026-08-04 22:42:33 +00:00
README.md docs: Added README.md 2026-08-05 00:02:33 +02:00
requirements.txt feat: changed output rendering to use jinja2 template 2026-08-04 11:10:38 +02:00

Fragcha - Automate changelog from fragments

Installation

pip install https://gitea.holm.dev/kjh/fragcha/archive/main.tar.gz

Usage

usage: python -m fragcha [-h] [--fragments FRAGMENTS] [--config CONFIG] {bump,changelog} ...

positional arguments:
  {bump,changelog}
    bump                Generate subsequent semver based on changelog fragments
    changelog           Generate changelog from fragments

options:
  -h, --help            show this help message and exit
  --fragments FRAGMENTS
                        Folder with changelog fragments (.yaml or .yml)
  --config CONFIG       Path to config file
usage: python -m fragcha bump [-h] --version VERSION [--output OUTPUT] [--ignore-major-zero]

options:
  -h, --help           show this help message and exit
  --version VERSION    Current version for which to generate the subsequent semver
  --output OUTPUT      File append changelog to (- for stdout)
  --ignore-major-zero  Don't treat major version 0 special (use to move from 0.X.Y to 1.0.0)
usage: python -m fragcha changelog [-h] [--version VERSION] [--output OUTPUT] [--append]

options:
  -h, --help         show this help message and exit
  --version VERSION  Version number to use in changelog header
  --output OUTPUT    File append changelog to (- for stdout)
  --append           Append to output file instead of prepending

Example changelog fragment

Without any extra configuration fragcha will check the .fragcha directory for yml and yaml files to generate a changelog from. This is an example with all sections that are available by default:

breaking_changes:
  - This is a major change, it will cause `fragcha bump` to increase the major version (except when on major version 0)
features:
  - This is a minor change, it will cause `fragcha bump` to increase the minor version
bugfixes:
  - This is a patch change, it will cause `fragcha bump` to increase the patch version
documentation:
  - This is a misc change, it will cause `fragcha bump` to increase the patch version

Example config

The build in defaults are equivalent to this fragcha.json5 being present:

{
  "sections": {
    "major": {
      "breaking_changes": "Breaking Changes"
    },
    "minor": {
      "features": "Features"
    },
    "patch": {
      "bugfixes": "Fixed bugs"
    },
    "misc": {
      "documentation": "Documentation"
    }
  },
  "template": "# {{ version }}\n\
\n\
{%- for section in sections %}\n\
## {{ section.title }}\n\
{%- for change in section['changes'] %}\n\
- {{ change }}\n\
{%- endfor %}\n\
{%- endfor %}\n\
***\n\
"
}