From 746ab6bd2641773ef7facb940e57774ac02f03d5 Mon Sep 17 00:00:00 2001 From: Rain7_osu <1789446861@qq.com> Date: Sat, 18 Sep 2021 20:02:06 +0800 Subject: [PATCH 1/2] init --- index.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 47fd4ba..0a5c53b 100644 --- a/index.js +++ b/index.js @@ -1,9 +1,18 @@ const app = require('express')(); const process = require('child_process'); +const bodyParser = require('body-parser') app.post('/', function (req, res, next) { - console.log(req); - res.end('12') + console.log(req?.body); + if ( + req?.body?.hook_name === 'merge_request_hooks' + && req?.body?.password === '842698' + && req?.body?.base?.ref === 'master' + ) { + console.log('update master, stared to building online app...'); + } else { + console.log('not standard pull request'); + } }); app.listen(9277, () => { -- Gitee From fefec6e51735e2b39d6748aa3eb68107093490de Mon Sep 17 00:00:00 2001 From: Rain7_osu <1789446861@qq.com> Date: Sat, 18 Sep 2021 20:13:48 +0800 Subject: [PATCH 2/2] test pr --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index 0a5c53b..77cbc27 100644 --- a/index.js +++ b/index.js @@ -13,6 +13,8 @@ app.post('/', function (req, res, next) { } else { console.log('not standard pull request'); } + + console.log('test pr'); }); app.listen(9277, () => { -- Gitee