fork/chhoto-url

git clone https://git.julia.blue/fork/chhoto-url

SinTan1729chore: Added SPDX headers to more files03bda27

unicode
3.8 KiB94 linesraw
1# SPDX-FileCopyrightText: 2023-2026 Sayantan Santra <sayantan.santra689@gmail.com>
2# SPDX-License-Identifier: MIT
3
4# git-cliff ~ configuration file
5# https://git-cliff.org/docs/configuration
6
7[changelog]
8# A Tera template to be rendered as the changelog's header.
9# See https://keats.github.io/tera/docs/#introduction
10header = "## Chhoto URL v{{ releases.0.version }}"
11body = """
12{%- macro remote_url() -%}
13  https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
14{%- endmacro -%}
15
16{% for group, commits in commits | group_by(attribute="group") %}
17    ### {{ group | striptags | trim | upper_first }}
18    {%- for commit in commits %}
19        - {{ commit.message | split(pat="\n") | first | upper_first | trim }}\
20            {% if commit.remote.username %} by @{{ commit.remote.username }}{%- endif -%}
21            {% if commit.remote.pr_number %} in \
22                [#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) \
23            {% else %} in \
24                {{ commit.id | truncate(length=7, end="") }}\
25            {% endif %}\
26    {% endfor %}
27{% endfor %}
28
29{%- if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
30  ## New Contributors
31{%- endif -%}
32
33{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
34  * @{{ contributor.username }} made their first contribution
35    {%- if contributor.pr_number %} in \
36      [#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
37    {%- endif %}
38{%- endfor %}\n
39"""
40# A Tera template to be rendered as the changelog's footer.
41# See https://keats.github.io/tera/docs/#introduction
42footer = """
43{%- macro remote_url() -%}
44  https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
45{%- endmacro -%}
46
47{% for release in releases -%}
48    {% if release.version -%}
49        {% if release.previous.version -%}
50            **Full Changelog:** \
51                {{ self::remote_url() }}/compare/{{ release.previous.version }}...{{ release.version }}
52        {% endif -%}
53    {% else -%}
54        **Full Changelog:** {{ self::remote_url() }}/compare/{{ release.previous.version }}...HEAD
55    {% endif -%}
56{% endfor %}\
57[Docker Hub](https://hub.docker.com/r/sintan1729/chhoto-url)
58[GHCR](https://github.com/SinTan1729/chhoto-url/pkgs/container/chhoto-url)
59"""
60# Remove leading and trailing whitespaces from the changelog's body.
61trim = true
62
63[git]
64# Parse commits according to the conventional commits specification.
65# See https://www.conventionalcommits.org
66conventional_commits = true
67# Exclude commits that do not match the conventional commits specification.
68filter_unconventional = false
69# An array of regex based parsers to modify commit messages prior to further processing.
70commit_preprocessors = [
71  # Remove issue numbers.
72  { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" },
73]
74# An array of regex based parsers for extracting data from the commit message.
75# Assigns commits to groups.
76# Optionally sets the commit's scope and can decide to exclude commits from further processing.
77commit_parsers = [
78  { message = "^[a|A]dd", group = "<0>New" },
79  { message = "^[n|N]ew", group = "<0>New" },
80  { message = "^[f|F]eat", group = "<0>New" },
81  { message = "^[f|F]ix", group = "<1>Fixes" },
82  { message = "^[c|C]hange", group = "<2>Changes" },
83  { message = "^[c|C]hg", group = "<2>Changes" },
84  { message = "^[r|R]emove", group = "<3>Removed" },
85  { message = "^[r|R]mv", group = "<3>Removed" },
86  { message = ".*", skip = true },
87]
88# Exclude commits that are not matched by any commit parser.
89filter_commits = true
90# Order releases topologically instead of chronologically.
91topo_order = false
92# Order of commits in each group/release within the changelog.
93# Allowed values: newest, oldest
94sort_commits = "newest"