mass-merge
Advanced tools
Comparing version 1.1.0 to 1.1.1
33
index.js
#!/usr/bin/env node | ||
"use strict"; | ||
var prompt = require('prompt'); | ||
const prompt = require("prompt"); | ||
@@ -85,15 +85,26 @@ if (process.argv.length < 4) { | ||
prompt.start(); | ||
if (response.data.total_count > 0) { | ||
prompt.start(); | ||
console.log('\n'); | ||
const { confirm } = await prompt.get([{ name: "confirm", description: 'Are you sure you want to proceed with the mass merge? (Y/N)' }]); | ||
console.log("\n"); | ||
const { confirm } = await prompt.get([ | ||
{ | ||
name: "confirm", | ||
description: | ||
"Are you sure you want to proceed with the mass merge? (Y/N)", | ||
}, | ||
]); | ||
if (!confirm || (confirm.toLowerCase() !== "n" && confirm.toLowerCase() !== "y")) { | ||
console.log("Please answer Y or N."); | ||
process.exit(1); | ||
} | ||
if ( | ||
!confirm || | ||
(confirm.toLowerCase() !== "n" && confirm.toLowerCase() !== "y") | ||
) { | ||
console.log("Please answer Y or N."); | ||
process.exit(1); | ||
} | ||
if (confirm.toLowerCase() === "n") { | ||
console.log("Exiting..."); | ||
process.exit(1); | ||
if (confirm.toLowerCase() === "n") { | ||
console.log("Exiting..."); | ||
process.exit(1); | ||
} | ||
} | ||
@@ -100,0 +111,0 @@ |
{ | ||
"name": "mass-merge", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A script for mass-approving and merging Dependabot pull requests", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
4072
124