mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
integrations: Add screenshot configs for fixtureless CI integrations.
This commit is contained in:
@@ -66,6 +66,8 @@ CATEGORIES: dict[str, StrPromise] = {
|
||||
# avoid circular dependency
|
||||
FIXTURELESS_INTEGRATIONS_WITH_SCREENSHOTS: list[str] = [
|
||||
"codebase",
|
||||
"github-actions",
|
||||
"jenkins",
|
||||
"mercurial",
|
||||
"perforce",
|
||||
"svn",
|
||||
@@ -609,7 +611,10 @@ INTEGRATIONS: dict[str, Integration] = {
|
||||
"errbot": Integration("errbot", ["meta-integration", "bots"]),
|
||||
"giphy": Integration("giphy", ["misc"], display_name="GIPHY"),
|
||||
"github-actions": Integration(
|
||||
"github-actions", ["continuous-integration"], display_name="GitHub Actions"
|
||||
"github-actions",
|
||||
["continuous-integration"],
|
||||
display_name="GitHub Actions",
|
||||
stream_name="github-actions updates",
|
||||
),
|
||||
"hubot": Integration("hubot", ["meta-integration", "bots"]),
|
||||
"jenkins": Integration("jenkins", ["continuous-integration"]),
|
||||
@@ -869,6 +874,7 @@ for integration, screenshots_contents in FIXTURELESS_SCREENSHOT_CONTENT.items():
|
||||
|
||||
FIXTURELESS_SCREENSHOT_CONFIG_OPTIONAL_FIELDS = {
|
||||
"mercurial": {"image_dir": "hg"},
|
||||
"jenkins": {"image_name": "004.png"},
|
||||
}
|
||||
|
||||
for integration, fields in FIXTURELESS_SCREENSHOT_CONFIG_OPTIONAL_FIELDS.items():
|
||||
|
@@ -1,3 +1,4 @@
|
||||
from datetime import datetime, timezone
|
||||
from typing import TypedDict
|
||||
|
||||
# For integrations that don't have example webhook fixtures/payloads,
|
||||
@@ -34,6 +35,10 @@ COMMIT_HASH_A = "a2e84e86ddf7e7f8a9b0c1d2e3f4a5b6c7d8e9f0"
|
||||
COMMIT_HASH_B = "9fceb02c0c4b8e4c1e7b43hd4e5f6a7b8c9d0e1f"
|
||||
DEPLOYMENT_HASH = "e494a5be3393"
|
||||
|
||||
# Example datetime content
|
||||
_DT = datetime(2025, 5, 30, 2, 0, 0, tzinfo=timezone.utc)
|
||||
DATETIME_STAMP = _DT.strftime("%Y-%m-%d %H:%M:%S")
|
||||
|
||||
|
||||
class ScreenshotContent(TypedDict):
|
||||
topic: str
|
||||
@@ -49,6 +54,17 @@ CODEBASE = ScreenshotContent(
|
||||
""",
|
||||
)
|
||||
|
||||
GITHUB_ACTIONS = ScreenshotContent(
|
||||
topic="scheduled backups",
|
||||
content=f"""Backup [failed]() at {DATETIME_STAMP}.
|
||||
> Unable to connect.""",
|
||||
)
|
||||
|
||||
JENKINS = ScreenshotContent(
|
||||
topic=PROJECT_NAME,
|
||||
content=f"**Build:** [#{REVISION_NUMBER}](): FAILURE :cross_mark:",
|
||||
)
|
||||
|
||||
MERCURIAL = ScreenshotContent(
|
||||
topic=BRANCH_MERCURIAL,
|
||||
content=f"""**{BO_NAME}** pushed [2 commits]() to **{BRANCH_MERCURIAL}** (`{REVISION_NUMBER}:{DEPLOYMENT_HASH[:12]}`):
|
||||
|
Reference in New Issue
Block a user