mirror of
https://github.com/orhun/git-cliff.git
synced 2024-11-25 13:13:39 +03:00
docs(website): add get_env filter example for GitLab CI
This commit is contained in:
parent
d7b2d031c4
commit
dfe4459c5c
@ -94,6 +94,16 @@ For example:
|
||||
https://gitlab.com/{{ remote.gitlab.owner }}/{{ remote.gitlab.repo }}/-/tags/{{ version }}
|
||||
```
|
||||
|
||||
:::tip
|
||||
|
||||
If you are using GitLab CI, you can use [`CI_PROJECT_URL`](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html) environment variable instead:
|
||||
|
||||
```jinja2
|
||||
{{ get_env(name="CI_PROJECT_URL") }}/-/tags/{{ version }}
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
### Commit authors
|
||||
|
||||
For each commit, GitLab related values are added as a nested object (named `gitlab`) to the [template context](/docs/templating/context):
|
||||
|
@ -84,3 +84,9 @@ commit_parsers = [
|
||||
{ field = "github.pr_labels", pattern = ".*", group = "<!-- 6 --> 🌀 Miscellaneous" },
|
||||
]
|
||||
```
|
||||
|
||||
## Use GitLab CI variables
|
||||
|
||||
```jinja2
|
||||
{{ get_env(name="CI_PROJECT_URL") }}/-/tags/{{ version }}
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user