fix: corrected issue with open/close

This commit is contained in:
Randell Dawson
2018-11-09 11:29:22 -08:00
committed by mrugesh mohapatra
parent 4b177e58fc
commit c7aea06a89

View File

@ -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)
})
};