Skip to content

Add --headless mode for CI/CD and GitHub Actions usage #176

@snipcodeit

Description

@snipcodeit

Description

Add a --headless flag to the MGW CLI for non-interactive CI/CD usage.

Scope (consolidated from closed issues #126, #127, #128)

Contract design (was #126):

  • Define which commands support --headless
  • How prompts are handled in headless mode (default to safe action, no stdin reads)
  • Structured JSON progress output format for CI consumers
  • Exit code contract: 0 on success, non-zero on any pipeline failure
  • Write spec in docs/HEADLESS.md

Implementation (was #127):

  • Add --headless to mgw:run and mgw:issue
  • Skip confirmation prompts, use defaults
  • Emit structured JSON progress to stdout per pipeline event
  • Exit codes 0/non-zero

GitHub Actions templates (was #128):

  • Add .github/workflows/mgw-auto-triage.yml (on: issue opened) as opt-in template
  • Add .github/workflows/mgw-milestone-exec.yml (workflow_dispatch) as opt-in template
  • Document how users copy these to their own repos

Notes

Depends on multi-provider architecture being stable (shipped in v5). Each provider will need headless behavior defined separately. The CI workflow templates depend on headless mode working correctly.

Acceptance Criteria

  • --headless flag accepted by mgw run and mgw issue
  • No stdin reads in headless mode
  • JSON progress events emitted to stdout
  • Exit code reflects pipeline success/failure
  • docs/HEADLESS.md spec written
  • Two GitHub Actions workflow templates provided as opt-in examples

Prior Issues

Consolidated from: #126, #127, #128

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogParked for future milestoneciclienhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions