mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-24 07:01:35 -04:00
15 lines
370 B
JavaScript
15 lines
370 B
JavaScript
const prOpenClose = async () => {
|
|
const result = await octokit.pullRequests.update({ owner, repo , number, state: 'closed', base })
|
|
.then(() => {
|
|
return octokit.pullRequests.update({ owner, repo , number, state: 'open', base })
|
|
})
|
|
.then(() => {
|
|
log.update(true)
|
|
})
|
|
.catch(() => {
|
|
log.update(false)
|
|
})
|
|
};
|
|
|
|
exports.changePrState = changePrState;
|