-
Notifications
You must be signed in to change notification settings - Fork 3
Templates
All templates must be located under the <project_folder>/src/templates folder.
The repeats are used to iterate through the list of entities.
| Type | Allowed to use | Description |
|---|---|---|
<!--repeat_namespaces--> <!--repeat_namespaces_end--> |
Everywhere | Iterate namespaces. For more details about namespaces see config options |
<!--repeat_releases--> <!--repeat_releases_end--> |
in scope of repeat_namespaces
|
Iterate release versions. |
<!--repeat_contributionTypes--> <!--repeat_contributionTypes_end--> |
in scope of repeat_releases
|
Iterate list of contribution types. (Use it only if you use data grouping) |
<!--repeat_items--> <!--repeat_items_end--> |
in scope of repeat_releases or repeat_contributionTypes
|
Iterate list of items. (Pull Requests, Issues) |
The application provides the list of tags that are allowed to use in any template. The tags will be replaced with real data during the changelog generation. The tags can be mixed in any way to build a custom template that will cover project needs.
| Tag | Format | Allowed to use | Modification | Description |
|---|---|---|---|---|
{{namespace}} |
<organization>/<repository>:<branch> |
in scope of repeat_namespaces
|
format can be changed by namespace_format directive, common directives |
Combination of GitHub organization, repository and branch |
{{organization}} |
<organization> |
in scope of repeat_namespaces
|
common directives | GitHub organization name |
{{repository}} |
<repository> |
in scope of repeat_namespaces
|
common directives | GitHub repository name |
{{branch}} |
<branch> |
in scope of repeat_namespaces
|
common directives | GitHub branch name |
{{created_at}} |
<yyyy-MM-dd> |
in scope of repeat_releases
|
format can be changed by date_format directive, common directives |
Release version created_at |
{{contribution_type}} |
<contribution_type> |
in scope of repeat_contributionTypes
|
common directives | Item (PR/Issue) contribution type |
{{number}} |
<number> |
in scope of repeat_items
|
common directives | Item (PR/Issue) number |
{{title}} |
<title> |
in scope of repeat_items
|
common directives | Item (PR/Issue) title |
{{author}} |
<author> |
in scope of repeat_items
|
common directives | Item (PR/Issue) author |
Directives are used to modify/transform the value.
The application allows using multiple directives for a single data item. Directives will be applied from left to right.
Example: {{namespace|namespace_format:short|capitalize}}
The namespace_format directive will be applied first and capitalize - next.
| Name | Format | Options | Description |
|---|---|---|---|
namespace_format |
{{ namespace|namespace_format:option }} |
|
dDfine view format of namespaces. |
date_format |
{{created_at|date_format:option}} | Any datetime format | define view format of date. Allowed for any date values. |
capitalize |
{{namespace|capitalize}} | - | Transform first letter in passed string. Allowed for any string values. |
Template repeat directives work like template directives but on repeat levels.
| Name | Format | Options | Description |
|---|---|---|---|
scope_content |
repeat_namespaces|scope_content | - | system directive. The directive adds invisible scope tags to the output file. These invisible scope tags are used for output file parsing that is required when strategy config options is merged. |
<!--repeat_namespaces|scope_content-->
{{namespace|namespace_format:short|capitalize}}
=============
<!--repeat_releases-->
## {{tag}} ({{created_at|date_format:dd-MM-yy}}) {{repository}} or {{organization}} or {{branch}}
<!--repeat_contributionTypes-->
### {{contribution_type}}
<!--repeat_items-->
* [{{organization}}/{{repository}}#{{number}}](https://github.com/{{organization}}/{{repository}}/pull/{{number}})
-- {{title}} by [@{{author}}](https://github.com/{{author}})
<!--repeat_items_end-->
<!--repeat_contributionTypes_end-->
<!--repeat_releases_end-->
<!--repeat_namespaces_end-->