Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle release_summary from config #16

Merged
merged 3 commits into from
Jun 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def is_valid_changelog_format(path: str) -> bool:
changelog_config = yaml.safe_load(config_file)
changes_type = tuple(item[0] for item in changelog_config["sections"])
changes_type += (changelog_config["trivial_section_name"],)
changes_type += (changelog_config["prelude_section_name"],)
logger.info("Found the following changelog sections: %s", changes_type)
except (OSError, yaml.YAMLError) as exc:
logger.info(
Expand Down Expand Up @@ -154,7 +155,10 @@ def is_valid_changelog_format(path: str) -> bool:
msg = f"{key} from {path} is not a valid changelog type"
logger.error(msg)
return False
if not isinstance(section[key], list):
if key == "release_summary" and not isinstance(section[key], str):
logger.error("release_summary should not be a list")
return False
elif key != "release_summary" and not isinstance(section[key], list):
logger.error(
"Changelog section %s from file %s must be a list, '%s' found instead.",
key,
Expand Down