mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
tools: Add support for generating integration screenshots remotely.
I have added support for generating integration screenshots remotely by adding a `realm_uri` parameter to `tools/message-screenshot.js` which we then pass `realm.uri` to from within `tools/generate-integration-docs-screenshot`.
This commit is contained in:
@@ -187,12 +187,13 @@ def send_bot_payload_message(
|
||||
|
||||
def capture_last_message_screenshot(bot: UserProfile, image_path: str) -> None:
|
||||
message = Message.objects.filter(sender=bot).last()
|
||||
realm = get_realm("zulip")
|
||||
if message is None:
|
||||
print(f"No message found for {bot.full_name}")
|
||||
return
|
||||
message_id = str(message.id)
|
||||
screenshot_script = os.path.join(TOOLS_DIR, "message-screenshot.js")
|
||||
subprocess.check_call(["node", screenshot_script, message_id, image_path])
|
||||
subprocess.check_call(["node", screenshot_script, message_id, image_path, realm.uri])
|
||||
|
||||
|
||||
def generate_screenshot_from_config(
|
||||
|
Reference in New Issue
Block a user