diff --git a/docs/user-guide/webhooks.md b/docs/user-guide/webhooks.md index f9b5f11b3..eeb863ecf 100644 --- a/docs/user-guide/webhooks.md +++ b/docs/user-guide/webhooks.md @@ -12,6 +12,8 @@ The following variables are all provided. ```ruby { event: @event, + username: @username, + email: @email, title: @title, app_name: @name, device_type: @device_type, @@ -31,6 +33,8 @@ Output: ```json { "event": "upload_events", + "username": "foobar", + "email": "foobar@example.com", "title": "Zealot upload 1.0.0 version", "app_name": "Zealot", "device_type": "iOS", diff --git a/docs/user-guide/webhooks/feishu.md b/docs/user-guide/webhooks/feishu.md index 2b4b3fb28..c5d5a6f29 100644 --- a/docs/user-guide/webhooks/feishu.md +++ b/docs/user-guide/webhooks/feishu.md @@ -29,27 +29,68 @@ Use card format could use partly of markdown syntax: "enable_forward": true }, "elements": [ + { + "tag": "div", + "fields": [ + { + "is_short": true, + "text": { + "tag": "lark_md", + "content": "**Platform**\n#{@device_type}" + } + }, + { + "is_short": true, + "text": { + "tag": "lark_md", + "content": "**Version**\n#{@release_version} (#{@build_version})" + } + }, + { + "is_short": true, + "text": { + "tag": "lark_md", + "content": "**Developer**\n#{@username}" + } + }, + { + "is_short": true, + "text": { + "tag": "lark_md", + "content": "**Upload date**\n#{@uploaded_at}" + } + }, + ] + }, { "tag": "div", "text": { - "content": "## #{@title}\nPlatform: #{@device_type}\nUplaod at: #{@uploaded_at}\nInstall QRcode:\n![qrcode](#{@qrcode_url})", + "content": "**Changelog**\n#{@changelog}", "tag": "lark_md" } }, { - "actions": [{ - "tag": "button", - "text": { - "content": "Install", - "tag": "lark_md" - }, - "url": @install_url, - "type": "default", - "value": {} - }], + "actions": [ + { + "tag": "button", + "text": { + "content": "🐞 Go to app", + "tag": "lark_md" + }, + "url": "#{@release_url}", + "type": "primary", + "value": {} + } + ], "tag": "action" } - ] + ], + "header": { + "title": { + "content": "#{@title}", + "tag": "plain_text" + } + } } } ``` diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/webhooks.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/webhooks.md index 81be64dee..52ad5d01a 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/webhooks.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/webhooks.md @@ -15,13 +15,17 @@ Zealot 为每个应用渠道都提供一个消息通知的网络钩子,网络 ```ruby { event: @event, + username: @username, + email: @email, title: @title, - app_name: @name, + name: @app_name, + app_name: @app_name, device_type: @device_type, release_version: @release_version, build_version: @build_version, size: @file_size, changelog: @changelog, + release_url: @release_url, install_url: @install_url, icon_url: @icon_url, qrcode_url: @qrcode_url, @@ -34,16 +38,19 @@ Zealot 为每个应用渠道都提供一个消息通知的网络钩子,网络 ```json { "event": "upload_events", + "username": "foobar", + "email": "foobar@example.com", "title": "Zealot 样例 iOS 内测版上传了 1.0.0 版本", "app_name": "Zealot 样例 iOS 内测版", "device_type": "iOS", "release_version": "1.0.0", "build_version": "1", "size": "30 MB", + "changelog": "- 新增了 A 功能\n- 修复了 B 问题\n- 发布 1.0.0 版本", + "release_url": "https://zealot.test/apps/x3gd/100", "install_url": "https://zealot.test/api/apps/download/12354", "icon_url": "https://zealot.test/api/apps/icon.png", "qrcode_url": "https://zealot.test/api/apps/354/qrcode", - "uploaded_at": "2019-12-30 11:33:00", - "changelog": "- 新增了 A 功能\n- 修复了 B 问题\n- 发布 1.0.0 版本", + "uploaded_at": "2019-12-30 11:33:00" } ``` diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/webhooks/feishu.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/webhooks/feishu.md index ab4c25483..59484a2ac 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/webhooks/feishu.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/webhooks/feishu.md @@ -16,7 +16,7 @@ ## Interactive 卡片格式 -通过这种格式可以实现支持 markdown 的部分语法: +通过这种格式可以实现支持 markdown 的部分语法(不支持外链图片展示): ```ruby { @@ -27,27 +27,68 @@ "enable_forward": true }, "elements": [ + { + "tag": "div", + "fields": [ + { + "is_short": true, + "text": { + "tag": "lark_md", + "content": "**平台**\n#{@device_type}" + } + }, + { + "is_short": true, + "text": { + "tag": "lark_md", + "content": "**版本**\n#{@release_version} (#{@build_version})" + } + }, + { + "is_short": true, + "text": { + "tag": "lark_md", + "content": "**最后提交者**\n#{@username}" + } + }, + { + "is_short": true, + "text": { + "tag": "lark_md", + "content": "**上传时间**\n#{@uploaded_at}" + } + }, + ] + }, { "tag": "div", "text": { - "content": "## #{@title}\n平台: #{@device_type}\n上传时间: #{@uploaded_at}\n安装二维码:\n![qrcode](#{@qrcode_url})", + "content": "**变更历史**\n#{@changelog}", "tag": "lark_md" } }, { - "actions": [{ - "tag": "button", - "text": { - "content": "点击安装", - "tag": "lark_md" - }, - "url": @install_url, - "type": "default", - "value": {} - }], + "actions": [ + { + "tag": "button", + "text": { + "content": "🐞 版本详情", + "tag": "lark_md" + }, + "url": "#{@release_url}", + "type": "primary", + "value": {} + } + ], "tag": "action" } - ] + ], + "header": { + "title": { + "content": "#{@title}", + "tag": "plain_text" + } + } } } ``` diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-5.0.0/user-guide/webhooks.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-5.0.0/user-guide/webhooks.md index 81be64dee..52ad5d01a 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-5.0.0/user-guide/webhooks.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-5.0.0/user-guide/webhooks.md @@ -15,13 +15,17 @@ Zealot 为每个应用渠道都提供一个消息通知的网络钩子,网络 ```ruby { event: @event, + username: @username, + email: @email, title: @title, - app_name: @name, + name: @app_name, + app_name: @app_name, device_type: @device_type, release_version: @release_version, build_version: @build_version, size: @file_size, changelog: @changelog, + release_url: @release_url, install_url: @install_url, icon_url: @icon_url, qrcode_url: @qrcode_url, @@ -34,16 +38,19 @@ Zealot 为每个应用渠道都提供一个消息通知的网络钩子,网络 ```json { "event": "upload_events", + "username": "foobar", + "email": "foobar@example.com", "title": "Zealot 样例 iOS 内测版上传了 1.0.0 版本", "app_name": "Zealot 样例 iOS 内测版", "device_type": "iOS", "release_version": "1.0.0", "build_version": "1", "size": "30 MB", + "changelog": "- 新增了 A 功能\n- 修复了 B 问题\n- 发布 1.0.0 版本", + "release_url": "https://zealot.test/apps/x3gd/100", "install_url": "https://zealot.test/api/apps/download/12354", "icon_url": "https://zealot.test/api/apps/icon.png", "qrcode_url": "https://zealot.test/api/apps/354/qrcode", - "uploaded_at": "2019-12-30 11:33:00", - "changelog": "- 新增了 A 功能\n- 修复了 B 问题\n- 发布 1.0.0 版本", + "uploaded_at": "2019-12-30 11:33:00" } ``` diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-5.0.0/user-guide/webhooks/feishu.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-5.0.0/user-guide/webhooks/feishu.md index ab4c25483..59484a2ac 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-5.0.0/user-guide/webhooks/feishu.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-5.0.0/user-guide/webhooks/feishu.md @@ -16,7 +16,7 @@ ## Interactive 卡片格式 -通过这种格式可以实现支持 markdown 的部分语法: +通过这种格式可以实现支持 markdown 的部分语法(不支持外链图片展示): ```ruby { @@ -27,27 +27,68 @@ "enable_forward": true }, "elements": [ + { + "tag": "div", + "fields": [ + { + "is_short": true, + "text": { + "tag": "lark_md", + "content": "**平台**\n#{@device_type}" + } + }, + { + "is_short": true, + "text": { + "tag": "lark_md", + "content": "**版本**\n#{@release_version} (#{@build_version})" + } + }, + { + "is_short": true, + "text": { + "tag": "lark_md", + "content": "**最后提交者**\n#{@username}" + } + }, + { + "is_short": true, + "text": { + "tag": "lark_md", + "content": "**上传时间**\n#{@uploaded_at}" + } + }, + ] + }, { "tag": "div", "text": { - "content": "## #{@title}\n平台: #{@device_type}\n上传时间: #{@uploaded_at}\n安装二维码:\n![qrcode](#{@qrcode_url})", + "content": "**变更历史**\n#{@changelog}", "tag": "lark_md" } }, { - "actions": [{ - "tag": "button", - "text": { - "content": "点击安装", - "tag": "lark_md" - }, - "url": @install_url, - "type": "default", - "value": {} - }], + "actions": [ + { + "tag": "button", + "text": { + "content": "🐞 版本详情", + "tag": "lark_md" + }, + "url": "#{@release_url}", + "type": "primary", + "value": {} + } + ], "tag": "action" } - ] + ], + "header": { + "title": { + "content": "#{@title}", + "tag": "plain_text" + } + } } } ``` diff --git a/versioned_docs/version-5.0.0/user-guide/webhooks.md b/versioned_docs/version-5.0.0/user-guide/webhooks.md index f9b5f11b3..eeb863ecf 100644 --- a/versioned_docs/version-5.0.0/user-guide/webhooks.md +++ b/versioned_docs/version-5.0.0/user-guide/webhooks.md @@ -12,6 +12,8 @@ The following variables are all provided. ```ruby { event: @event, + username: @username, + email: @email, title: @title, app_name: @name, device_type: @device_type, @@ -31,6 +33,8 @@ Output: ```json { "event": "upload_events", + "username": "foobar", + "email": "foobar@example.com", "title": "Zealot upload 1.0.0 version", "app_name": "Zealot", "device_type": "iOS", diff --git a/versioned_docs/version-5.0.0/user-guide/webhooks/feishu.md b/versioned_docs/version-5.0.0/user-guide/webhooks/feishu.md index 2b4b3fb28..c5d5a6f29 100644 --- a/versioned_docs/version-5.0.0/user-guide/webhooks/feishu.md +++ b/versioned_docs/version-5.0.0/user-guide/webhooks/feishu.md @@ -29,27 +29,68 @@ Use card format could use partly of markdown syntax: "enable_forward": true }, "elements": [ + { + "tag": "div", + "fields": [ + { + "is_short": true, + "text": { + "tag": "lark_md", + "content": "**Platform**\n#{@device_type}" + } + }, + { + "is_short": true, + "text": { + "tag": "lark_md", + "content": "**Version**\n#{@release_version} (#{@build_version})" + } + }, + { + "is_short": true, + "text": { + "tag": "lark_md", + "content": "**Developer**\n#{@username}" + } + }, + { + "is_short": true, + "text": { + "tag": "lark_md", + "content": "**Upload date**\n#{@uploaded_at}" + } + }, + ] + }, { "tag": "div", "text": { - "content": "## #{@title}\nPlatform: #{@device_type}\nUplaod at: #{@uploaded_at}\nInstall QRcode:\n![qrcode](#{@qrcode_url})", + "content": "**Changelog**\n#{@changelog}", "tag": "lark_md" } }, { - "actions": [{ - "tag": "button", - "text": { - "content": "Install", - "tag": "lark_md" - }, - "url": @install_url, - "type": "default", - "value": {} - }], + "actions": [ + { + "tag": "button", + "text": { + "content": "🐞 Go to app", + "tag": "lark_md" + }, + "url": "#{@release_url}", + "type": "primary", + "value": {} + } + ], "tag": "action" } - ] + ], + "header": { + "title": { + "content": "#{@title}", + "tag": "plain_text" + } + } } } ```