From 4dd376b5655ee4ec438f0472c6f37cb2d3af908c Mon Sep 17 00:00:00 2001 From: lizheming Date: Mon, 10 Dec 2018 11:19:08 +0800 Subject: [PATCH] add drone_build_link for msg_url default --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 0e89fab..7482976 100644 --- a/index.js +++ b/index.js @@ -22,7 +22,9 @@ const { PLUGIN_BTN_TEXT, PLUGIN_TITLE, - PLUGIN_MESSAGE + PLUGIN_MESSAGE, + + DRONE_BUILD_LINK } = process.env; function getAccessToken() { @@ -54,7 +56,7 @@ function sendMsgFromWork(access_token) { const SAFE = PLUGIN_SAFE || 0; const TITLE = PLUGIN_TITLE; const DESCRIPTION = render(PLUGIN_MESSAGE); - const MSG_URL = PLUGIN_MSG_URL; + const MSG_URL = PLUGIN_MSG_URL || DRONE_BUILD_LINK; const BTN_TEXT = PLUGIN_BTN_TEXT; return request({