From e9ffad8cb3667554b869b78964c46e00c1955da4 Mon Sep 17 00:00:00 2001 From: tbushman Date: Wed, 31 Oct 2018 20:47:33 -0600 Subject: [PATCH] test --- probot/presolver/index.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/probot/presolver/index.js b/probot/presolver/index.js index f7ccc363f1..be08239091 100644 --- a/probot/presolver/index.js +++ b/probot/presolver/index.js @@ -1,4 +1,4 @@ -const Presolver = require('./lib/presolver'); +/*const Presolver = require('./lib/presolver'); function probotPlugin(robot) { const events = [ @@ -26,14 +26,20 @@ function getPullRequest(context) { } module.exports = probotPlugin; - -/*module.exports = async app => { +*/ +module.exports = async app => { // Your code here app.log('Yay, the app was loaded!') - app.on('issues.opened', async context => { - const issueComment = context.issue({ body: 'Thanks for opening this issue!' }) - return context.github.issues.createComment(issueComment) + app.on('pull_request.labeled', async context => { + const [requestedAction, prNumber] = context.payload.requested_action.identifier.split(':') + return context.github.pullRequests.update(context.repo({ + number: prNumber, + body: body.trim() ? `${body.trim()}\n\nprobot label test` : 'probot label test' + })) + + + }) // For more information on building apps: @@ -41,4 +47,4 @@ module.exports = probotPlugin; // To get your app running against GitHub, see: // https://probot.github.io/docs/development/ -}*/ +}