| 1 | # git-cliff ~ configuration file |
| 2 | # https://git-cliff.org/docs/configuration |
| 3 | |
| 4 | [changelog] |
| 5 | # A Tera template to be rendered for each release in the changelog. |
| 6 | # See https://keats.github.io/tera/docs/#introduction |
| 7 | body = """ |
| 8 | {% if version %}\ |
| 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} |
| 10 | {% else %}\ |
| 11 | ## [unreleased] |
| 12 | {% endif %}\ |
| 13 | {% for group, commits in commits | unique(attribute="message") | group_by(attribute="group") %} |
| 14 | ### {{ group | striptags | trim | upper_first }} |
| 15 | {% for commit in commits %} |
| 16 | - {% if commit.scope %}*({{ commit.scope }})* {% endif %}\ |
| 17 | {% if commit.breaking %}[**breaking**] {% endif %}\ |
| 18 | {{ commit.message | upper_first | split(pat="\n") | first }}\ |
| 19 | {% endfor %} |
| 20 | {% endfor %} |
| 21 | |
| 22 | """ |
| 23 | # Remove leading and trailing whitespaces from the changelog's body. |
| 24 | trim = true |
| 25 | # Render body even when there are no releases to process. |
| 26 | render_always = true |
| 27 | # An array of regex based postprocessors to modify the changelog. |
| 28 | postprocessors = [ |
| 29 | # Replace the placeholder <REPO> with a URL. |
| 30 | { pattern = '<REPO>', replace = "https://github.com/netdata/netdata" }, |
| 31 | ] |
| 32 | # output file path |
| 33 | # |
| 34 | # This is intentionally set to a dummy path, as we need additional |
| 35 | # options that can only be specified on the command line to generate |
| 36 | # the file correctly, and it’s expected that anyone is using the |
| 37 | # packaging/generate-changelog.sh script (or is smart enough to inspect |
| 38 | # it and extrapolate how to run the command correctly). |
| 39 | output = "test.md" |
| 40 | |
| 41 | [git] |
| 42 | # Parse commits according to the conventional commits specification. |
| 43 | # See https://www.conventionalcommits.org |
| 44 | conventional_commits = false |
| 45 | # Exclude commits that do not match the conventional commits specification. |
| 46 | filter_unconventional = false |
| 47 | # Require all commits to be conventional. |
| 48 | # Takes precedence over filter_unconventional. |
| 49 | require_conventional = false |
| 50 | # Split commits on newlines, treating each line as an individual commit. |
| 51 | split_commits = false |
| 52 | # An array of regex based parsers to modify commit messages prior to further processing. |
| 53 | commit_preprocessors = [ |
| 54 | # Replace issue numbers with link templates to be updated in `changelog.postprocessors`. |
| 55 | { pattern = '(\w+\s)?#([0-9]+)', replace = "[#${2}](<REPO>/issues/${2})"}, |
| 56 | # Check spelling of the commit message using https://github.com/crate-ci/typos. |
| 57 | # If the spelling is incorrect, it will be fixed automatically. |
| 58 | #{ pattern = '.*', replace_command = 'typos --write-changes -' }, |
| 59 | ] |
| 60 | # Prevent commits that are breaking from being excluded by commit parsers. |
| 61 | protect_breaking_commits = false |
| 62 | # An array of regex based parsers for extracting data from the commit message. |
| 63 | # Assigns commits to groups. |
| 64 | # Optionally sets the commit's scope and can decide to exclude commits from further processing. |
| 65 | # |
| 66 | # Our workflow only generates PRs for actual changes, thus we don’t |
| 67 | # need special grouping here. |
| 68 | commit_parsers = [ |
| 69 | { message = "^(?i)\\[ci skip]", skip = true }, |
| 70 | { message = ".*", group = "Merged Pull Requests:" }, |
| 71 | ] |
| 72 | # Exclude commits that are not matched by any commit parser. |
| 73 | filter_commits = false |
| 74 | # An array of link parsers for extracting external references, and turning them into URLs, using regex. |
| 75 | link_parsers = [ |
| 76 | { pattern = "#(\\d+)", href = "https://github.com/netdata/netdata/issues/$1"}, |
| 77 | { pattern = "RFC(\\d+)", text = "ietf-rfc$1", href = "https://datatracker.ietf.org/doc/html/rfc$1"}, |
| 78 | ] |
| 79 | # Include only the tags that belong to the current branch. |
| 80 | use_branch_tags = true |
| 81 | # Order releases topologically instead of chronologically. |
| 82 | topo_order = false |
| 83 | # Order releases topologically instead of chronologically. |
| 84 | topo_order_commits = true |
| 85 | # Order of commits in each group/release within the changelog. |
| 86 | # Allowed values: newest, oldest |
| 87 | sort_commits = "oldest" |
| 88 | # Process submodules commits |
| 89 | recurse_submodules = false |