Skip to content

Add --force flag to connection delete and scope delete #98

@ewega

Description

@ewega

Problem

connection delete and scope delete always call prompt.Confirm() for confirmation, with no way to skip it. This makes both commands unusable in CI/CD pipelines or automation scripts — they hang waiting for stdin input that never arrives.

The cleanup command already supports a --force flag (cleanupForce in cleanup.go:16) that skips confirmation. These two commands should have parity.

Scope of Changes

configure_connection_delete.go

  • Add connDeleteForce bool flag: --force
  • Skip prompt.Confirm when connDeleteForce is true

configure_scope_delete.go

  • Add scopeDeleteForce bool flag: --force
  • Skip prompt.Confirm when scopeDeleteForce is true

Acceptance Criteria

  • gh devlake configure connection delete --plugin github --id 1 --force deletes without prompting
  • gh devlake configure scope delete --plugin github --connection-id 1 --scope-id 123 --force deletes without prompting
  • Without --force, both commands still prompt for confirmation (no behavior change)
  • go build ./... and go test ./... pass

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions