Skip to content

Commit

Permalink
test(fixture): add fixture for include-path
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Dec 9, 2024
1 parent a23eeb4 commit e85888f
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/fixtures/test-monorepo-include-path/cliff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[changelog]
# template for the changelog footer
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://keats.github.io/tera/docs/#introduction
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits %}
- {{ commit.message | upper_first }}\
{% endfor %}
{% endfor %}\n
"""
# template for the changelog footer
footer = """
<!-- generated by git-cliff -->
"""
# remove the leading and trailing whitespace from the templates
trim = true

[git]
# regex for parsing and grouping commits
commit_parsers = [
{ message = "^feat", group = "Features", default_scope = "app" },
{ message = "^fix", group = "Bug Fixes", scope = "cli" },
]
8 changes: 8 additions & 0 deletions .github/fixtures/test-monorepo-include-path/commit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e

git remote add origin https://github.com/orhun/git-cliff
git fetch
mv cliff.toml cliff.toml.bak
git checkout 076feb74b4d8c8634669f57d4e2765c39490d80e
mv cliff.toml.bak cliff.toml
18 changes: 18 additions & 0 deletions .github/fixtures/test-monorepo-include-path/expected.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Changelog

All notable changes to this project will be documented in this file.

## [unreleased]

### Bug Fixes

- Include the root commit when `--latest` is used with one tag (#901)
- Match PR and release metadata correctly (#907)
- Fix missing commit fields in context (#837) (#920)
- Preserve first time contributors (#925)

### Features

- Allow overriding the remote API URL via config (#896)

<!-- generated by git-cliff -->
2 changes: 2 additions & 0 deletions .github/workflows/test-fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ jobs:
command: --tag v0.2.0
- fixtures-name: test-custom-remote-api-url
command: v1.4.0..v1.4.1
- fixtures-name: test-monorepo-include-path
command: v2.6.1..v2.7.0 --include-path .github/fixtures/

steps:
- name: Checkout
Expand Down

0 comments on commit e85888f

Please sign in to comment.