From 2533b5f5cdc05f6ad3f425676b4a36ecf70c8f7e Mon Sep 17 00:00:00 2001 From: lizheming Date: Mon, 8 Jan 2018 22:40:16 +0800 Subject: [PATCH] update docs.md --- DOCS.md | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 75 insertions(+), 4 deletions(-) diff --git a/DOCS.md b/DOCS.md index f2f5d82..5284b5a 100644 --- a/DOCS.md +++ b/DOCS.md @@ -14,8 +14,8 @@ The Wechat plugin posts build status messages to your account. The below pipelin pipline: wechat: image: lizheming/drone-wechat - sckey: xxxxxx - title: "plugin notification" ++ sckey: xxxxxx + title: ${DRONE_REPO_NAME} message: > {%if success %} build {{build.number}} succeeded. Good job. @@ -24,19 +24,90 @@ pipline: {% endif %} ``` -# Praameter Reference +If you want push notification with your own wechat corp id, you can config like this: + +```yaml +pipeline: + wechat: + image: lizheming/drone-wechat ++ corpid: corpid ++ corp_secret: secret ++ agent_id: 1234567 ++ to_user: 111 ++ to_party: 112 ++ to_tag: ${DRONE_REPO_NAME} ++ msg_url: ${DRONE_BUILD_LINK} ++ safe: 1 ++ btn_txt: more + title: ${DRONE_REPO_NAME} + message: > + {%if success %} + build {{build.number}} succeeded. Good job. + {% else %} + build {{build.number}} failed. Fix me please. + {% endif %} +``` + +# Parameter Reference + +corpid +: The corpid for authorization + +corp_secret +: The corp secret for authorization + +agent_id: +: The agent id to send the message + +to_party +: The party ids to send message + +to_user +: The user ids to send the message to + +to_tag +: The tag ids to send the message to + +safe +: encrypt message, default is false + +msg_url +: The link for the text card click + +btn_text +: The text for the button on the card sckey : SCKEY get from [ServerChan](http://sc.ftqq.com) title : Notification title + message : Notification body message, support markdown # Secret Reference -server\_chan\_key +wechat\_corpid +: The corpid for authorization + +wechat\_corp_secret +: The corp secret for authorization + +wechat\_agent\_id +: The agent id to send the message + +wechat\_to\_party +: The party ids to send message + + +wechat\_to\_user +: The user ids to send the message to + +wechat\_to\_tag +: The tag ids to send the message to + +wechat\_sckey : SCKEY get from [ServerChan](http://sc.ftqq.com) # Template Reference