Skip to content

Commit

Permalink
(build) Add GRM template files
Browse files Browse the repository at this point in the history
These files are used to control the exact format of the release notes
that are generated when using GitReleaseManager.
  • Loading branch information
gep13 committed Apr 28, 2023
1 parent 9452044 commit 9ce0a7e
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .templates/default/create/footer.sbn
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{ if config.create.include_footer }}

### {{ config.create.footer_heading }}

{{ if config.create.milestone_replace_text
replace_milestone_title config.create.footer_content config.create.milestone_replace_text milestone.target.title
else
config.create.footer_content
end
end }}
10 changes: 10 additions & 0 deletions .templates/default/index.sbn
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{-
include 'release-info'
if milestone.target.description
include 'milestone'
end
include 'issues' | string.rstrip
if template_kind == "CREATE"
include 'create/footer'
end
~}}
5 changes: 5 additions & 0 deletions .templates/default/issue-details.sbn
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### {{ issue_label }}

{{ for issue in issues.items[issue_label]
include 'issue-note'
end }}
1 change: 1 addition & 0 deletions .templates/default/issue-note.sbn
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- {{ issue.title }} - see [#{{ issue.number }}]({{ issue.html_url }})
4 changes: 4 additions & 0 deletions .templates/default/issues.sbn
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

{{ for issue_label in issue_labels
include 'issue-details'
end }}
2 changes: 2 additions & 0 deletions .templates/default/milestone.sbn
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

{{ milestone.target.description }}
10 changes: 10 additions & 0 deletions .templates/default/release-info.sbn
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{
if issues.count > 0
if commits.count > 0
}}As part of this release we had [{{ commits.count }} {{ commits.count | string.pluralize "commit" "commits" }}]({{ commits.html_url }}) which resulted in [{{ issues.count }} {{ issues.count | string.pluralize "issue" "issues" }}]({{ milestone.target.html_url }}?closed=1) being closed.
{{ else
}}As part of this release we had [{{ issues.count }} {{ issues.count | string.pluralize "issue" "issues" }}]({{ milestone.target.html_url }}?closed=1) closed.
{{ end
else if commits.count > 0
}}As part of this release we had [{{ commits.count }} {{ commits.count | string.pluralize "commit" "commits" }}]({{ commits.html_url }}).
{{ end -}}

0 comments on commit 9ce0a7e

Please sign in to comment.