Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
integrations: Add screenshot configs for productivity integrations.
Niloth Pd70b099644da
diff --git a/zerver/lib/integrations.py b/zerver/lib/integrations.pyindex f2a9691f458..917bc4ab358 100644--- a/zerver/lib/integrations.py+++ b/zerver/lib/integrations.py@@ -70,9 +70,11 @@ FIXTURELESS_INTEGRATIONS_WITH_SCREENSHOTS: list[str] = ["codebase","discourse","github-actions",+ "google-calendar","jenkins","mastodon","mercurial",+ "notion","openshift","perforce","puppet",@@ -884,6 +886,7 @@ for integration, screenshots_contents in FIXTURELESS_SCREENSHOT_CONTENT.items():FIXTURELESS_SCREENSHOT_CONFIG_OPTIONAL_FIELDS = {"mercurial": {"image_dir": "hg"},"jenkins": {"image_name": "004.png"},+ "google-calendar": {"image_name": "003.png", "image_dir": "google/calendar"},}for integration, fields in FIXTURELESS_SCREENSHOT_CONFIG_OPTIONAL_FIELDS.items():diff --git a/zerver/webhooks/fixtureless_integrations.py b/zerver/webhooks/fixtureless_integrations.pyindex 46c5a7efadf..b5bb772f37c 100644--- a/zerver/webhooks/fixtureless_integrations.py+++ b/zerver/webhooks/fixtureless_integrations.py@@ -47,9 +47,12 @@ TICKET_NUMBER = THREE_DIGIT_NUMBER# Example datetime content_DT = datetime(2025, 5, 30, 2, 0, 0, tzinfo=timezone.utc)+DATETIME_STAMP = _DT.strftime("%Y-%m-%d %H:%M:%S")DATETIME_GLOBAL = f"<time:{_DT.strftime('%Y-%m-%dT%H:%M:%S%z')}>"+DATE_ISO_8601 = _DT.strftime("%Y-%m-%d")+DATE_LONG = _DT.strftime("%A, %B %d, %Y")class ScreenshotContent(TypedDict):@@ -88,6 +91,14 @@ GITHUB_ACTIONS = ScreenshotContent(> Unable to connect.""",)+GOOGLE_CALENDAR = ScreenshotContent(+ topic="Team reminders",+ content=f"""The [Development Sync]() event is scheduled from 2 PM - 3 PM on {DATE_LONG} at Conference Room B.+> Let's align on our current sprint progress, address any blockers, and share updates. Your input is crucial!++[Join call]().""",+)+JENKINS = ScreenshotContent(topic=PROJECT_NAME,content=f"**Build:** [#{REVISION_NUMBER}](): FAILURE :cross_mark:",@@ -108,6 +119,14 @@ MERCURIAL = ScreenshotContent(""",)+NOTION = ScreenshotContent(+ topic=f"{PROJECT_NAME} Release {VERSION_NUMBER}",+ content=f"""**{BO_NAME}** [commented]() on:+> project demo scheduled++Can we reschedule this to next week?""",+)+OPENSHIFT = ScreenshotContent(topic=PROJECT_NAME,content=f"""Deployment [{REVISION_NUMBER}]() triggered by a push to **{BRANCH_GIT}** by commit [{COMMIT_HASH_A[:7]}]() at {DATETIME_STAMP} has **failed**.""",