add main file

This commit is contained in:
lizheming
2018-01-05 00:26:13 +08:00
parent 06d88ccb38
commit ded6254060
2 changed files with 49 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
const render = require('drone-render');
const request = require('request-promise-native');
const {
PLUGIN_SCKEY,
PLUGIN_TITLE,
PLUGIN_MESSAGE,
SERVER_CHAN_KEY
} = process.env;
const SCKEY = PLUGIN_SCKEY || SERVER_CHAN_KEY;
request({
url: `https://sc.ftqq.com/${SCKEY}.send`,
qs: {
text: PLUGIN_TITLE,
desp: render(PLUGIN_MESSAGE)
}
});
+30
View File
@@ -0,0 +1,30 @@
{
"name": "drone-wechat",
"version": "0.0.1",
"description": "drone wechat notification plugin",
"main": "index.js",
"scripts": {
"test": "\"\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/lizheming/drone-wechat.git"
},
"keywords": [
"drone",
"plugin",
"wechat",
"node"
],
"author": "lizheming <i@imnerd.org>",
"license": "MIT",
"bugs": {
"url": "https://github.com/lizheming/drone-wechat/issues"
},
"homepage": "https://github.com/lizheming/drone-wechat#readme",
"dependencies": {
"drone-render": "^1.0.0",
"request": "^2.83.0",
"request-promise-native": "^1.0.5"
}
}