This commit is contained in:
tbushman
2018-10-31 20:47:33 -06:00
committed by mrugesh mohapatra
parent c2790fbb2d
commit e9ffad8cb3

View File

@ -1,4 +1,4 @@
const Presolver = require('./lib/presolver'); /*const Presolver = require('./lib/presolver');
function probotPlugin(robot) { function probotPlugin(robot) {
const events = [ const events = [
@ -26,14 +26,20 @@ function getPullRequest(context) {
} }
module.exports = probotPlugin; module.exports = probotPlugin;
*/
/*module.exports = async app => { module.exports = async app => {
// Your code here // Your code here
app.log('Yay, the app was loaded!') app.log('Yay, the app was loaded!')
app.on('issues.opened', async context => { app.on('pull_request.labeled', async context => {
const issueComment = context.issue({ body: 'Thanks for opening this issue!' }) const [requestedAction, prNumber] = context.payload.requested_action.identifier.split(':')
return context.github.issues.createComment(issueComment) 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: // For more information on building apps:
@ -41,4 +47,4 @@ module.exports = probotPlugin;
// To get your app running against GitHub, see: // To get your app running against GitHub, see:
// https://probot.github.io/docs/development/ // https://probot.github.io/docs/development/
}*/ }