mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 08:26:11 +00:00
integrations: Add screenshot configs for productivity integrations.
that do not have fixtures.
This commit is contained in:
@@ -70,9 +70,11 @@ FIXTURELESS_INTEGRATIONS_WITH_SCREENSHOTS: list[str] = [
|
|||||||
"codebase",
|
"codebase",
|
||||||
"discourse",
|
"discourse",
|
||||||
"github-actions",
|
"github-actions",
|
||||||
|
"google-calendar",
|
||||||
"jenkins",
|
"jenkins",
|
||||||
"mastodon",
|
"mastodon",
|
||||||
"mercurial",
|
"mercurial",
|
||||||
|
"notion",
|
||||||
"openshift",
|
"openshift",
|
||||||
"perforce",
|
"perforce",
|
||||||
"puppet",
|
"puppet",
|
||||||
@@ -884,6 +886,7 @@ for integration, screenshots_contents in FIXTURELESS_SCREENSHOT_CONTENT.items():
|
|||||||
FIXTURELESS_SCREENSHOT_CONFIG_OPTIONAL_FIELDS = {
|
FIXTURELESS_SCREENSHOT_CONFIG_OPTIONAL_FIELDS = {
|
||||||
"mercurial": {"image_dir": "hg"},
|
"mercurial": {"image_dir": "hg"},
|
||||||
"jenkins": {"image_name": "004.png"},
|
"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():
|
for integration, fields in FIXTURELESS_SCREENSHOT_CONFIG_OPTIONAL_FIELDS.items():
|
||||||
|
|||||||
@@ -47,9 +47,12 @@ TICKET_NUMBER = THREE_DIGIT_NUMBER
|
|||||||
|
|
||||||
# Example datetime content
|
# Example datetime content
|
||||||
_DT = datetime(2025, 5, 30, 2, 0, 0, tzinfo=timezone.utc)
|
_DT = datetime(2025, 5, 30, 2, 0, 0, tzinfo=timezone.utc)
|
||||||
|
|
||||||
DATETIME_STAMP = _DT.strftime("%Y-%m-%d %H:%M:%S")
|
DATETIME_STAMP = _DT.strftime("%Y-%m-%d %H:%M:%S")
|
||||||
DATETIME_GLOBAL = f"<time:{_DT.strftime('%Y-%m-%dT%H:%M:%S%z')}>"
|
DATETIME_GLOBAL = f"<time:{_DT.strftime('%Y-%m-%dT%H:%M:%S%z')}>"
|
||||||
|
|
||||||
DATE_ISO_8601 = _DT.strftime("%Y-%m-%d")
|
DATE_ISO_8601 = _DT.strftime("%Y-%m-%d")
|
||||||
|
DATE_LONG = _DT.strftime("%A, %B %d, %Y")
|
||||||
|
|
||||||
|
|
||||||
class ScreenshotContent(TypedDict):
|
class ScreenshotContent(TypedDict):
|
||||||
@@ -88,6 +91,14 @@ GITHUB_ACTIONS = ScreenshotContent(
|
|||||||
> Unable to connect.""",
|
> 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(
|
JENKINS = ScreenshotContent(
|
||||||
topic=PROJECT_NAME,
|
topic=PROJECT_NAME,
|
||||||
content=f"**Build:** [#{REVISION_NUMBER}](): FAILURE :cross_mark:",
|
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(
|
OPENSHIFT = ScreenshotContent(
|
||||||
topic=PROJECT_NAME,
|
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**.""",
|
content=f"""Deployment [{REVISION_NUMBER}]() triggered by a push to **{BRANCH_GIT}** by commit [{COMMIT_HASH_A[:7]}]() at {DATETIME_STAMP} has **failed**.""",
|
||||||
|
|||||||
Reference in New Issue
Block a user