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

Remove changelog length limit #1738

Merged
merged 1 commit into from
Jan 11, 2025
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
5 changes: 0 additions & 5 deletions tools/changelog/changelog_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
CL_VALID = ":scroll: CL валиден"
CL_NOT_NEEDED = ":scroll: CL не требуется"

DISCORD_EMBED_DESCRIPTION_LIMIT = 4096

CL_BODY = re.compile(r"(:cl:|🆑)[ \t]*(?P<author>.+?)?\s*\n(?P<content>(.|\n)*?)\n/(:cl:|🆑)", re.MULTILINE)
CL_SPLIT = re.compile(r"\s*(?:(?P<tag>\w+)\s*:)?\s*(?P<message>.*)")

Expand Down Expand Up @@ -50,9 +48,6 @@ def validate_changelog(changelog: dict):
raise Exception("The changelog has no author.")
if len(changelog["changes"]) == 0:
raise Exception("No changes found in the changelog. Use special label if changelog is not expected.")
message = "\n".join(map(lambda change: f"{change['tag']} {change['message']}", changelog["changes"]))
if len(message) > DISCORD_EMBED_DESCRIPTION_LIMIT:
raise Exception(f"The changelog exceeds the length limit ({DISCORD_EMBED_DESCRIPTION_LIMIT}). Shorten it.")


def parse_changelog(pr_body: str, tags_config: dict | None = None) -> dict | None:
Expand Down
Loading