No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
kjh e24b5fae7d
All checks were successful
Run renovate on local repository / Renovate (push) Successful in 12s
Run renovate on local repository / Call Renovate (push) Successful in 0s
Update .forgejo/workflows/renovate.yaml
2026-08-24 01:09:15 +02:00
.forgejo/workflows Update .forgejo/workflows/renovate.yaml 2026-08-24 01:09:15 +02:00
.fragcha Bumped version and updated changelog 2026-08-20 20:56:19 +00:00
fragcha Resolving environment variables for renovate sub-command 2026-08-20 22:46:31 +02:00
.gitignore Added build, __pycache__ and *.egg-ignore to .gitignore 2026-08-20 21:04: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-20 20:56:19 +00:00
fragcha.json5 Added renovate subcommand 2026-08-20 21:02:50 +02:00
LICENSE.md chore: Added license 2026-08-03 01:58:23 +02:00
pyproject.toml Bumped version and updated changelog 2026-08-20 20:56:19 +00:00
README.md Resolving environment variables for renovate sub-command 2026-08-20 22:46:31 +02:00
renovate.json5 Added renovate 2026-08-20 22:32:30 +02:00
requirements.txt Merge pull request 'Update dependency semver to v3.0.4' (#9) from renovate/semver-3.x into main 2026-08-20 22:52:25 +02:00

Fragcha - Automate changelog from fragments

Installation

pip install fragcha

Usage

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

positional arguments:
  {bump,changelog,renovate}
    bump                Generate subsequent semver based on changelog fragments
    changelog           Generate changelog from fragments
    renovate            Generate changelog fragments for renovate pull requests

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
usage: python -m fragcha renovate [-h] --data-file DATA_FILE [--section SECTION]

options:
  -h, --help            show this help message and exit
  --data-file DATA_FILE
                        Renovate data file (will resolve environment variables if it starts with $)
  --section SECTION     Section for changelog entries (default: dependencies)

This expects the DATA_FILE to use this template:

"dataFileTemplate": "{\"branchName\":\"{{{branchName}}}\",\"upgrades\":[{{#each upgrades}}{\"depName\": \"{{{depName}}}\", \"currentVersion\": \"{{{currentVersion}}}\", \"newVersion\": \"{{{newVersion}}}\"}{{#unless @last}},{{\/unless}}{{\/each}}]}"

See renovate documentation for more details.

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",
      "dependencies": "Dependency updates"
    },
    "misc": {
      "documentation": "Documentation"
    }
  },
  "renovate-template": "Updated {{ depName }} to {{ newVersion }}",
  "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\
"
}