diff --git a/prOpenClose.js b/prOpenClose.js index 74051550cc..e0045cdf44 100644 --- a/prOpenClose.js +++ b/prOpenClose.js @@ -2,6 +2,8 @@ require('dotenv').config(); const { owner, repo, fccBaseUrl, prBaseUrl } = require('./constants'); const { octokitConfig, octokitAuth } = require('./octokitConfig'); const octokit = require('@octokit/rest')(octokitConfig); +const { addComment } = require('./addComment'); + octokit.authenticate(octokitAuth); const prOpenClose = async (number) => { @@ -10,13 +12,10 @@ const prOpenClose = async (number) => { return octokit.pullRequests.update({ owner, repo , number, state: 'open', base: 'master' }) }) .then(() => { - console.log('success') - //log.update(true) + addComment(number, 'Closed and Reopened this PR to attempt to resolve a specific Travis build failure.'); }) .catch((err) => { - console.log('catch') console.log(err) - //log.update(false) }) };