Skip to content

Support environment variables in commit parsers #1286

@harlequin

Description

@harlequin

Is there an existing issue or pull request for this?

  • I have searched the existing issues and pull requests

Feature description

I have a monorepo with around 100 projects. At the moment I have to maintain in every single project folder an own cliff.toml, because git-cliff has two missing features, which denies a --config-url usage:-

(1) It would be great if the commit-parser can include somehow a pre-processor for env variables

This is what the project cliff.toml looks like

`{ message = "^feat\\(app1):", group = "<!-- 0 -->🚀 Features" },`

Wish would be

`{ message = "^feat\\(${GIT_CLIFF_SCOPE}):", group = "<!-- 0 -->🚀 Features" },`

With this we would have the possibility to define the scope via GIT_CLIFF_SCOPE

(2) Initial tag can not be set via cli or env variable

At the moment the cliff.toml looks like

```
[git]
tag_pattern = "app1-v[0-9]+\\.[0-9]+\\.[0-9]+" # THIS CAN BE SET SUCCESSFUL VIA CLI
[bump]
initial_tag = "app1-v1.0.0" # <- THIS IS THE REQUEST 
```

It would be great to get also the initial_tag as env variable or cli option in order

Desired solution

As described above

Alternatives considered

None

Additional context

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions