Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

tools: Check feature level update first in notify api change tool.

Lauryn Menardd92b03f92b3d
diff --git a/tools/notify-if-api-docs-changed b/tools/notify-if-api-docs-changed
index 85d004cb301..0205df97dff 100755
--- a/tools/notify-if-api-docs-changed
+++ b/tools/notify-if-api-docs-changed
@@ -53,7 +53,7 @@ def get_changelog_entries() -> str:
if current_feature_level_found:
changelog_entries += line
- return changelog_entries.replace("\n ", " ")
+ return changelog_entries.replace("\n ", " ").rstrip()
def get_feature_level_before_commit() -> int:
@@ -80,15 +80,15 @@ def get_feature_level_before_commit() -> int:
if __name__ == "__main__":
- pull_request = get_pull_request_number_or_commit_hash()
-
feature_level = get_feature_level(update_feature_level=False) - 1
if feature_level <= get_feature_level_before_commit():
sys.exit(1)
- changelog_entries = get_changelog_entries()
topic = f"new feature level: {feature_level}"
+ pull_request = get_pull_request_number_or_commit_hash()
+ changelog_entries = get_changelog_entries()
+
content = f"{pull_request} has updated the API documentation for the following endpoints: \n{changelog_entries}"
github_output = os.environ.get("GITHUB_OUTPUT")
if github_output: