@@ -22,19 +22,38 @@ Acronyms:
22
22
# template for the changelog body
23
23
# https://keats.github.io/tera/docs/#introduction
24
24
body = """
25
+ {%- macro remote_url() -%}
26
+ https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
27
+ {%- endmacro -%}
28
+
25
29
{% if version %}\
26
30
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
27
31
{% else %}\
28
32
## [unreleased]
29
33
{% endif %}\
30
- {% for group, commits in commits | group_by(attribute="group") %}
31
- ### {{ group | striptags | trim | upper_first }}
32
- {% for commit in commits | filter (attribute="merge_commit", value=false ) %}
34
+ {% for group, commits in commits | unique(attribute="id") | group_by(attribute="group") %}
35
+ ### {{ group | upper_first }}
36
+ {% for commit in commits | unique (attribute="message" ) %}
33
37
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
34
38
{% if commit.breaking %}[**breaking**] {% endif %}\
35
39
{{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/BITNP/BIThesis/commit/{{ commit.id }}))\
40
+ {% if commit.github.username %} by @{{ commit.github.username }}{%- endif -%}
41
+ {% if commit.github.pr_number %} in \
42
+ [#{{ commit.github.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.github.pr_number }}) \
43
+ {%- endif -%}
36
44
{% endfor %}
37
45
{% endfor %}\n
46
+
47
+ {%- if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
48
+ ## New Contributors
49
+ {%- endif -%}
50
+
51
+ {% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
52
+ * @{{ contributor.username }} made their first contribution
53
+ {%- if contributor.pr_number %} in \
54
+ [#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
55
+ {%- endif %}
56
+ {%- endfor %}\n
38
57
"""
39
58
# template for the changelog footer
40
59
footer = """
@@ -82,7 +101,7 @@ commit_parsers = [
82
101
# protect breaking changes from being skipped due to matching a skipping commit_parser
83
102
protect_breaking_commits = false
84
103
# filter out the commits that are not matched by commit parsers
85
- filter_commits = true
104
+ filter_commits = false
86
105
# regex for matching git tags
87
106
# tag_pattern = "v[0-9].*"
88
107
# regex for skipping tags
@@ -95,3 +114,7 @@ topo_order = false
95
114
sort_commits = " oldest"
96
115
# limit the number of commits included in the changelog.
97
116
# limit_commits = 42
117
+
118
+ [remote .github ]
119
+ owner = " BITNP"
120
+ repo = " BIThesis"
0 commit comments