-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup towncrier for release notes generation
Resolves: #99 Signed-off-by: Ryan Lerch <[email protected]>
- Loading branch information
Showing
8 changed files
with
913 additions
and
544 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,41 @@ | ||
# Release notes | ||
|
||
<!-- towncrier release notes start --> | ||
|
||
## v1.0.8 | ||
|
||
Released on 2023-03-29. | ||
|
||
### Changes | ||
|
||
- Drop support for Python 3.6 to update dependencies, and add support for Python 3.10 and 3.11 | ||
- Update dependencies | ||
- Fix Sphinx config | ||
- Fix CI | ||
- Allow additional operation arguments in `list_all_entities` | ||
- Register the `X-Fields` mask format | ||
- Restore compatibility with `requests` < 2.26.0 to support RHEL9 | ||
|
||
### Contributors | ||
|
||
Many thanks to the contributors of bug reports, pull requests, and pull request | ||
reviews for this release: | ||
|
||
- Akashdeep Dhar | ||
- Aurélien Bompard | ||
- Carl George | ||
|
||
## v1.0.7 | ||
|
||
Released on 2022-05-11. | ||
|
||
### Development Improvements | ||
|
||
- add and configure packit (#268) | ||
|
||
### Contributors | ||
|
||
Many thanks to the contributors of bug reports, pull requests, and pull request | ||
reviews for this release: | ||
|
||
- Stephen Coady |
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,58 @@ | ||
{% macro reference(value) -%} | ||
{%- if value.startswith("PR") -%} | ||
PR #{{ value[2:] }} | ||
{%- elif value.startswith("C") -%} | ||
[{{ value[1:] }}](https://github.com/fedora-infra/fasjson-client/commits/{{ value[1:] }}) | ||
{%- else -%} | ||
#{{ value }} | ||
{%- endif -%} | ||
{%- endmacro -%} | ||
|
||
{{- top_line -}} | ||
|
||
Released on {{ versiondata.date }}. This is a {major|feature|bugfix} release that adds [short summary]. | ||
|
||
{% for section, _ in sections.items() -%} | ||
{%- if section -%} | ||
## {{section}} | ||
{%- endif -%} | ||
|
||
{%- if sections[section] -%} | ||
{%- for category, val in definitions.items() if category in sections[section] and category != "author" -%} | ||
### {{ definitions[category]['name'] }} | ||
|
||
{% if definitions[category]['showcontent'] -%} | ||
{%- for text, values in sections[section][category].items() %} | ||
- {{ text }} ({% for value in values -%} | ||
{{ reference(value) }} | ||
{%- if not loop.last %}, {% endif -%} | ||
{%- endfor %}). | ||
{% endfor -%} | ||
{%- else -%} | ||
- {{ sections[section][category]['']|sort|join(', ') }} | ||
|
||
{% endif -%} | ||
{%- if sections[section][category]|length == 0 %} | ||
No significant changes. | ||
|
||
{% else -%} | ||
{%- endif %} | ||
|
||
{% endfor -%} | ||
{%- if sections[section]["author"] %} | ||
## {{definitions['author']["name"]}} | ||
|
||
Many thanks to the contributors of bug reports, pull requests, and pull request | ||
reviews for this release: | ||
|
||
{% for text, values in sections[section]["author"].items() -%} | ||
- {{ text }} | ||
{% endfor -%} | ||
{%- endif -%} | ||
|
||
{% else -%} | ||
No significant changes. | ||
|
||
|
||
{% endif -%} | ||
{%- endfor -%} |
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,74 @@ | ||
#!/usr/bin/env python3 | ||
|
||
""" | ||
This script browses through git commit history (starting at latest tag), collects all authors of | ||
commits and creates fragment for `towncrier`_ tool. | ||
It's meant to be run during the release process, before generating the release notes. | ||
Example:: | ||
$ python get_authors.py | ||
.. _towncrier: https://github.com/hawkowl/towncrier/ | ||
Authors: | ||
Aurelien Bompard | ||
Michal Konecny | ||
""" | ||
|
||
import os | ||
from argparse import ArgumentParser | ||
from subprocess import check_output | ||
|
||
|
||
EXCLUDE = [ | ||
"dependabot[bot]", | ||
"dependabot-preview[bot]", | ||
"Weblate (bot)", | ||
"renovate[bot]", | ||
] | ||
|
||
last_tag = check_output( | ||
"git tag | sort -n | tail -n 1", shell=True, universal_newlines=True | ||
).strip() | ||
|
||
args_parser = ArgumentParser() | ||
args_parser.add_argument( | ||
"until", | ||
nargs="?", | ||
default="HEAD", | ||
help="Consider all commits until this one (default: %(default)s).", | ||
) | ||
args_parser.add_argument( | ||
"since", | ||
nargs="?", | ||
default=last_tag, | ||
help="Consider all commits since this one (default: %(default)s).", | ||
) | ||
args = args_parser.parse_args() | ||
|
||
authors = {} | ||
log_range = args.since + ".." + args.until | ||
output = check_output( | ||
["git", "log", log_range, "--format=%ae\t%an"], universal_newlines=True | ||
) | ||
print(last_tag) | ||
for line in output.splitlines(): | ||
email, fullname = line.split("\t") | ||
email = email.split("@")[0].replace(".", "") | ||
if email in authors: | ||
continue | ||
authors[email] = fullname | ||
|
||
for nick, fullname in authors.items(): | ||
if fullname in EXCLUDE or fullname.endswith("[bot]"): | ||
continue | ||
filename = f"{nick}.author" | ||
if os.path.exists(filename): | ||
print(f"Author Already Created {fullname} ({nick})") | ||
continue | ||
print(f"Adding author {fullname} ({nick})") | ||
with open(filename, "w") as f: | ||
f.write(fullname) | ||
f.write("\n") |
Oops, something went wrong.