Skip to content

Commit

Permalink
chore: update inquirer
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Jul 28, 2024
1 parent efe12c7 commit f9b2206
Show file tree
Hide file tree
Showing 3 changed files with 200 additions and 150 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
"module:bulk": "zx ./tools/module_bulk.mjs"
},
"devDependencies": {
"@inquirer/prompts": "^5.3.2",
"chokidar": "^3.6.0",
"concurrently": "^8.2.2",
"dotenv": "^16.4.5",
"inquirer": "^9.3.6",
"jest": "^29.7.0",
"octokit": "^4.0.2",
"open": "^10.1.0",
Expand Down
17 changes: 7 additions & 10 deletions tools/backport_module_changes.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env zx

import { Octokit, App } from 'octokit'
import inquirer from 'inquirer'
import { confirm } from '@inquirer/prompts'
import open from 'open'
import dotenv from 'dotenv'
dotenv.config()
Expand Down Expand Up @@ -67,15 +67,12 @@ for (const item of newList.data) {
const compareUrl = `https://github.com/bitfocus/companion-module-${item.path}/compare/${oldRef}...${newRef}`
await open(compareUrl)

const action = await inquirer.prompt([
{
type: 'confirm',
name: 'action',
message: 'Merge it? ',
default: false,
},
])
if (action.action) {
const action = await confirm({
// name: 'action',
message: 'Merge it? ',
default: false,
})
if (action) {
console.log(`importing ${item.path}@${newRef} into ${oldRev}`)

await octokit.rest.actions.createWorkflowDispatch({
Expand Down
Loading

0 comments on commit f9b2206

Please sign in to comment.