Skip to content

feat: remove interactive mode for full automation support#11

Merged
pchuri merged 1 commit intomainfrom
feat/remove-interactive-mode
Dec 10, 2025
Merged

feat: remove interactive mode for full automation support#11
pchuri merged 1 commit intomainfrom
feat/remove-interactive-mode

Conversation

@pchuri
Copy link
Copy Markdown
Owner

@pchuri pchuri commented Dec 10, 2025

Summary

This PR removes all interactive prompts from the JIRA CLI to make it fully scriptable and automation-friendly for CI/CD pipelines.

Breaking Changes

Commands Removed:

  • jira init - replaced with jira config --server <url> --username <email> --token <token>

Commands Modified:

  • jira config - no longer falls back to interactive mode when no options provided
  • jira issue create - requires --project, --type, --summary flags
  • jira issue edit - requires at least one field flag
  • jira issue delete - requires --force flag
  • jira sprint list - requires --board when multiple boards exist

New Features

  • --description-file <path> option for reading multi-line descriptions from files

Changes Made

Core Library

  • ✅ Removed interactiveSetup() method from lib/config.js
  • ✅ Updated error messages to guide users to explicit configuration

Commands

  • ✅ Deleted bin/commands/init.js entirely
  • ✅ Updated bin/root.js to remove init command and update Quick Start
  • ✅ Modified bin/commands/config.js to require explicit options
  • ✅ Refactored bin/commands/issue.js:
    • Removed all interactive prompts
    • Added validation for required options
    • Added --description-file support
  • ✅ Updated bin/commands/sprint.js to show board list with error instead of prompting

Dependencies & Tests

  • ✅ Removed inquirer from package.json
  • ✅ Removed inquirer mock from tests/setup.js
  • ✅ Deleted tests/commands/init.test.js
  • All 78 tests passing

Documentation

  • ✅ Updated README.md with non-interactive examples
  • ✅ Updated CLAUDE.md with non-interactive design philosophy
  • ✅ Created comprehensive MIGRATION.md guide

Test Plan

  • All existing tests pass (78/78)
  • Lint passes
  • Pre-commit hooks pass
  • inquirer dependency successfully removed
  • Configuration via CLI flags works
  • Configuration via environment variables works
  • Issue create requires all flags
  • Issue edit requires at least one flag
  • Issue delete requires --force
  • Description file reading works
  • Clear error messages when options missing

Migration Guide

A complete migration guide has been added in MIGRATION.md covering:

  • Before/after examples for all commands
  • CI/CD integration patterns
  • Troubleshooting common issues
  • Shell script examples

Benefits

  • Scriptable: Can be used in CI/CD pipelines without hanging
  • Automation-friendly: No interactive delays
  • Clear: Explicit requirements shown upfront
  • Flexible: Support for both CLI flags and environment variables
  • Powerful: File-based input for complex descriptions

Semantic Versioning

This is a breaking change that will trigger a major version bump (v2.0.0) when merged to main.

@pchuri pchuri changed the title feat!: remove interactive mode for full automation support feat: remove interactive mode for full automation support Dec 10, 2025
@pchuri pchuri requested a review from Copilot December 10, 2025 02:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes all interactive prompts from the JIRA CLI to enable full automation support in CI/CD pipelines. The changes eliminate the inquirer dependency and require all command inputs to be provided explicitly via CLI flags or environment variables.

Key Changes:

  • Removed jira init command and interactiveSetup() method, requiring explicit configuration via jira config with flags
  • Made all issue operations (create, edit, delete) require explicit command-line flags instead of falling back to interactive prompts
  • Added --description-file option for reading multi-line content from files

Reviewed changes

Copilot reviewed 7 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/setup.js Removed inquirer mock from test setup since the dependency is no longer used
tests/commands/init.test.js Deleted entire test file for removed jira init command
package.json Removed inquirer dependency from project dependencies
lib/config.js Removed interactiveSetup() method and updated error messages to guide users to explicit configuration
README.md Updated all examples to show non-interactive command usage with explicit flags
MIGRATION.md Added comprehensive migration guide with before/after examples and troubleshooting
CLAUDE.md Updated documentation to reflect non-interactive CLI design philosophy

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

MIGRATION.md Outdated
Comment on lines +35 to +40
jira config --server https://jira.workers-hub.com \
--username user@company.com \
--token your-api-token

# Or use environment variables (recommended for CI/CD)
export JIRA_HOST=jira.workers-hub.com
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The domain 'workers-hub.com' is inconsistent with other examples in the file that use 'company.com'. Consider using 'company.com' for consistency.

Suggested change
jira config --server https://jira.workers-hub.com \
--username user@company.com \
--token your-api-token
# Or use environment variables (recommended for CI/CD)
export JIRA_HOST=jira.workers-hub.com
jira config --server https://jira.company.com \
--username user@company.com \
--token your-api-token
# Or use environment variables (recommended for CI/CD)
export JIRA_HOST=jira.company.com

Copilot uses AI. Check for mistakes.
BREAKING CHANGE: Removed all interactive prompts and inquirer dependency.

- Remove 'jira init' command - use 'jira config' with explicit flags
- Issue create/edit now require all options via CLI flags
- Add --description-file option for multi-line descriptions
- Issue delete requires --force flag
- Sprint list requires --board when multiple boards exist
- Remove inquirer dependency

Migration guide added in MIGRATION.md.

This change makes the CLI fully scriptable for CI/CD pipelines.
@pchuri pchuri force-pushed the feat/remove-interactive-mode branch from dd16c40 to c0adcca Compare December 10, 2025 02:48
@pchuri pchuri merged commit 872a39c into main Dec 10, 2025
5 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 10, 2025
# [2.0.0](v1.1.1...v2.0.0) (2025-12-10)

* feat!: remove interactive mode for full automation support (#11) ([872a39c](872a39c)), closes [#11](#11)

### BREAKING CHANGES

* Removed all interactive prompts and inquirer dependency.

- Remove 'jira init' command - use 'jira config' with explicit flags
- Issue create/edit now require all options via CLI flags
- Add --description-file option for multi-line descriptions
- Issue delete requires --force flag
- Sprint list requires --board when multiple boards exist
- Remove inquirer dependency

Migration guide added in MIGRATION.md.

This change makes the CLI fully scriptable for CI/CD pipelines.
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants