"glab changelog generate" does not use my template

216 Views Asked by At

I've recently discovered glab and I find it great, so I started squashing merge requests and add git trailers to be leveraged when generating the changelog.

Since I don't like much the default template for the changelog generation, I've decided to create a simplified one in the default place (.gitlab/changelog_config.yml) which looks like this:

---
  categories:
    added: Added
    fixed: Fixed
    fix: Fixed
  template: |
    {% if categories %}
    {% each categories %}
    ### {{ title }}

    {% each entries %}
    - {{ title }}
    {% end %}

    {% end %}

But the result seems to follow only the default template.

I've tried to run the following command:

glab changelog generate --version v1.2.3 --from <hash>

but the generated output doesn't follow my config but the default one.

Nothing changes even if I explicitly specify the config file:

glab changelog generate --version v1.2.3 --from <hash> --config .gitlab/changelog_config.yml

I'm actually expecting the template I provide is followed, as claimed in the documentation.

1

There are 1 best solutions below

1
Xavier On

I had the same issue, you have to upload this config file on your repository on the "develop" branch.

Working in local does not work, glab seems to call the API to process the changelog generation.

Hope it helps