Skip to content

Add rename secret support (press R)#92

Merged
karl-sjogren merged 2 commits into
developfrom
copilot/add-option-to-rename-secrets
Mar 14, 2026
Merged

Add rename secret support (press R)#92
karl-sjogren merged 2 commits into
developfrom
copilot/add-option-to-rename-secrets

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 14, 2026

Secrets could be listed, added, edited, and deleted, but not renamed without a delete-then-add workaround. This adds first-class rename support.

Changes

  • Tool.cs — New RenameSecret method: prompts key selection, then an editable name field pre-filled with the current name. Blocks rename if the target name already exists (no silent overwrites). Wired to R key in HandleInput; help line updated accordingly.
  • ToolTests.cs — Unit tests covering: successful rename, collision prevention, and Escape-to-cancel.
  • ConsoleUIIntegrationTests.cs — Integration tests verifying filesystem persistence for both the happy path and the collision guard.
Original prompt

This section details on the original issue you should resolve

<issue_title>Make it possible to rename secrets</issue_title>
<issue_description>Some times you want to rename a secret, either due to a new name being needed or just to easily switch between two different values (ie using a local or remote connection string).

This should be added as an option by pressing "r", then selecting the key to rename and then selecting a new name. If selecting an already used name it should not allow to overwrite the existing value.</issue_description>

Comments on the Issue (you are @copilot in this section)


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Co-authored-by: karl-sjogren <875092+karl-sjogren@users.noreply.github.com>
Copilot AI changed the title [WIP] Add option to rename secrets in settings Add rename secret support (press R) Mar 14, 2026
Copilot AI requested a review from karl-sjogren March 14, 2026 14:49
@karl-sjogren karl-sjogren marked this pull request as ready for review March 14, 2026 14:50
@karl-sjogren karl-sjogren merged commit eabf342 into develop Mar 14, 2026
5 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.78%. Comparing base (213d52f) to head (188e896).
⚠️ Report is 9 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #92      +/-   ##
===========================================
+ Coverage    69.92%   70.78%   +0.86%     
===========================================
  Files           10       10              
  Lines          542      558      +16     
  Branches        91       94       +3     
===========================================
+ Hits           379      395      +16     
  Misses         115      115              
  Partials        48       48              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make it possible to rename secrets

2 participants