diff --git a/static/images/integrations/git/001.png b/static/images/integrations/git/001.png new file mode 100644 index 0000000000..45ff9ef1c9 Binary files /dev/null and b/static/images/integrations/git/001.png differ diff --git a/zerver/lib/integrations.py b/zerver/lib/integrations.py index 3c482dcdfb..7ac9c4708f 100644 --- a/zerver/lib/integrations.py +++ b/zerver/lib/integrations.py @@ -70,6 +70,7 @@ FIXTURELESS_INTEGRATIONS_WITH_SCREENSHOTS: list[str] = [ "capistrano", "codebase", "discourse", + "git", "github-actions", "google-calendar", "jenkins", @@ -749,8 +750,6 @@ NO_SCREENSHOT_CONFIG = ( # the integration is planned to be removed "twitter", } - # Python API Integrations that do not currently have screenshots in docs - | {"git"} | NO_SCREENSHOT_WEBHOOKS | hubot_integration_names ) diff --git a/zerver/tests/test_docs.py b/zerver/tests/test_docs.py index 2825229ca4..bb9c7d25c2 100644 --- a/zerver/tests/test_docs.py +++ b/zerver/tests/test_docs.py @@ -417,7 +417,7 @@ class DocPageTest(ZulipTestCase): # for the PythonAPIIntegrations, so we cannot avoid going out of sync # when adding/deleting screenshots. # Use this set to temporarily add exclusions to this test. - exception_images: set[str] = {"jira-plugin/001.png"} + exception_images: set[str] = {"jira-plugin/001.png", "git/001.png"} images_in_dir.update(exception_images) images_in_docs.update(exception_images) diff --git a/zerver/webhooks/fixtureless_integrations.py b/zerver/webhooks/fixtureless_integrations.py index d1f3459cc5..0d66d264db 100644 --- a/zerver/webhooks/fixtureless_integrations.py +++ b/zerver/webhooks/fixtureless_integrations.py @@ -14,9 +14,11 @@ THREE_DIGIT_NUMBER = "492" # Example user content BO_NAME = "Bo Williams" +BO_EMAIL = "bwilliams@example.com" BO_GIT_NAME = "bo-williams" KEVIN_NAME = "Kevin Lin" +KEVIN_EMAIL = "klin@example.com" # Example project content PROJECT_NAME = "Example Project" @@ -85,6 +87,14 @@ DISCOURSE = ScreenshotContent( > {COMMIT_BODY_A}""", ) +GIT = ScreenshotContent( + topic=BRANCH_GIT, + content=f"""`{DEPLOYMENT_HASH[:12]}` was deployed to `{BRANCH_GIT}` with: +* {KEVIN_EMAIL} - {COMMIT_HASH_A[:7]}: {COMMIT_MESSAGE_A} +* {BO_EMAIL} - {COMMIT_HASH_B[:7]}: {COMMIT_MESSAGE_B} +""", +) + GITHUB_ACTIONS = ScreenshotContent( topic="scheduled backups", content=f"""Backup [failed]() at {DATETIME_STAMP}.