Skip to content

Add configure connection update command #11

@ewega

Description

@ewega

Summary

Add a configure connection update subcommand for token rotation, endpoint changes, and org/enterprise updates without recreating the connection (which would lose scope configs and blueprint associations).

Design

gh devlake configure connection update --plugin gh-copilot --id 2 --token ghp_newtoken gh devlake configure connection update # interactive: show current values, prompt for changes

Interactive flow:

  1. List connections, user picks one
  2. Show current values (name, endpoint, org, enterprise, token masked)
  3. Prompt each field with current as default (Enter to keep)
  4. Test updated connection
  5. PATCH /plugins/{plugin}/connections/{id}

Changes

  • Add update subcommand under configure connection
  • Add UpdateConnection method to devlake.Client using PATCH
  • Interactive: display current values, prompt for each with defaults
  • Flag-based: only specified flags are updated, others kept
  • Test connection after update

Acceptance Criteria

  • Token rotation works via --token flag
  • Interactive mode shows current values
  • Only changed fields are sent in PATCH
  • Connection tested after update
  • State file updated with new values

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