-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add template for GitHub Releases (#67)
* docs: Add extension that will enable GitHub Pages use for doc hosting. * ci: Add template for generating release notes for GitHub. * docs: Update changelog with information on template. * ci: Update version used for semantic release
- Loading branch information
Showing
8 changed files
with
74 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{%- macro populate_variables() %} | ||
{%- set latest_release_dict_entry = (context.history.released.items()|list)[0] %} | ||
{%- set latest_version_number = latest_release_dict_entry[0].as_tag() %} | ||
{%- set latest_version_date = latest_release_dict_entry[1].tagged_date.strftime("%Y-%m-%d") %} | ||
{%- set recently_merged_prs = {} %} | ||
{%- for type_, commits in latest_release_dict_entry[1]["elements"] | dictsort %} | ||
{%- for commit in commits %} | ||
{%- set pr_num = commit.commit.message.rstrip().rsplit("(#", 1)[-1].rsplit(")", 1)[0]|int %} | ||
{%- if pr_num %} | ||
{%- do recently_merged_prs.update({commit.commit.message.split("\n")[0].rsplit("(#", 1)[0]|safe: pr_num}) %} | ||
{%- endif %} | ||
{%- endfor %} | ||
{%- endfor %} | ||
|
||
{%- if recently_merged_prs %} | ||
{%- set merged_prs_text_list = ["\n\n### Merged Pull Requests\n\n"] %} | ||
{%- for message, number in recently_merged_prs.items() %} | ||
{%- do merged_prs_text_list.append("- " ~ message ~ "([#" + number|string ~ "](" ~ number|string|pull_request_url ~ "))\n") %} | ||
{%- endfor %} | ||
{%- set merged_prs_text = (merged_prs_text_list|join).rstrip() %} | ||
{%- else %} | ||
{%- set merged_prs_text = "" %} | ||
{%- endif %} | ||
{%- set output = (latest_version_number, latest_version_date, merged_prs_text) %} | ||
{{- caller(output) }} | ||
{%- endmacro %} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{%- import ".macros.j2" as macros %} | ||
|
||
{%- call(output) macros.populate_variables() %} | ||
{%- filter replace("Things to be included in the next release go here.", "# " + output[0] + " (" + output[1] + ")" + output[2])|replace("##", "#") %} | ||
{%- include ".previous_release_notes_for_template.md" %} | ||
{% endfilter %} | ||
{%- endcall %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,7 @@ | ||
{%- set latest_release_dict_entry = (context.history.released.items()|list)[0] %} | ||
{%- set latest_version_number = latest_release_dict_entry[0].as_tag() %} | ||
{%- set latest_version_date = latest_release_dict_entry[1].tagged_date.strftime("%Y-%m-%d") %} | ||
{%- set recently_merged_prs = {} %} | ||
{%- for type_, commits in latest_release_dict_entry[1]["elements"] | dictsort %} | ||
{%- for commit in commits %} | ||
{%- set pr_num = commit.commit.message.rstrip().rsplit("(#", 1)[-1].rsplit(")", 1)[0]|int %} | ||
{%- if pr_num %} | ||
{%- do recently_merged_prs.update({commit.commit.message.split("\n")[0].rsplit("(#", 1)[0]|safe: pr_num}) %} | ||
{%- endif %} | ||
{%- endfor %} | ||
{%- endfor %} | ||
{%- import ".macros.j2" as macros %} | ||
|
||
{%- if recently_merged_prs %} | ||
{%- set merged_prs_text_list = ["\n\n### Merged Pull Requests\n\n"] %} | ||
{%- for message, number in recently_merged_prs.items() %} | ||
{%- do merged_prs_text_list.append("- " ~ message ~ "([#" + number|string ~ "](" ~ number|string|pull_request_url ~ "))\n") %} | ||
{%- endfor %} | ||
{%- set merged_prs_text = (merged_prs_text_list|join).rstrip() %} | ||
{%- else %} | ||
{%- set merged_prs_text = "" %} | ||
{%- endif %} | ||
|
||
|
||
{%- filter replace("Things to be included in the next release go here.", "Things to be included in the next release go here.\n\n______________________________________________________________________\n\n## " + latest_version_number + " (" + latest_version_date + ")" + merged_prs_text) %} | ||
{%- include ".previous_changelog_for_template.md" %} | ||
{% endfilter %} | ||
{%- call(output) macros.populate_variables() %} | ||
{%- filter replace("Things to be included in the next release go here.", "Things to be included in the next release go here.\n\n______________________________________________________________________\n\n## " + output[0] + " (" + output[1] + ")" + output[2]) %} | ||
{%- include ".previous_changelog_for_template.md" %} | ||
{% endfilter %} | ||
{%- endcall %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters