feat(cli): add ability to list deleted branches and recover deleted branch - #269
Open
aluuu wants to merge 7 commits into
Open
Conversation
Add an optional renderHeaders map to the table writer so a column's header can override the name auto-derived from its field key, and use it in branches list to render the recovery column as 'Recoverable Until' instead of 'Recovery'. Co-authored-by: Isaac
ivanoglo
approved these changes
Jul 6, 2026
ivanoglo
left a comment
There was a problem hiding this comment.
I have one minor comment. I tried to test it locally, but seems like it does not work. Maybe because this feature is not enabled. How can I test this functionality (I don't have access to posthog)?
| ]); | ||
| }); | ||
|
|
||
| test("delete by id with hard-delete", async ({ testCliCommand }) => { |
There was a problem hiding this comment.
Why are we only testing delete by id and recover by id and name? We can delete by name too, we should test that too.
andrelandgraf
approved these changes
Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
why?
The Neon public API now supports branch recovery: a deleted branch can be recovered within a 7-day window instead of being lost. This change adds
neonctlsupport for that feature so users can recover a deleted branch, list deleted branches, see the recovery deadline and permanently delete a branch.what?
neonctl branches recover <id|name>— new subcommandbranches list --include-deleted— includes recoverable deleted branches; sendsinclude_deleted=falseexplicitly when the flag is absent.listtable output a deleted branch showsCurrent State = deletedplus aRecoverable Untilcolumn (recoverable_until).branches delete --hard-delete— permanently deletes immediately, skipping the 7-day recovery window (hard_delete=true).