Add Undo-TfsGitRepositoryRemoval cmdlet for restoring repositories from Recycle Bin#247
Draft
Add Undo-TfsGitRepositoryRemoval cmdlet for restoring repositories from Recycle Bin#247
Conversation
This was
linked to
issues
Jun 6, 2025
Co-authored-by: igoravl <725797+igoravl@users.noreply.github.com>
Co-authored-by: igoravl <725797+igoravl@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for restoring repos from Recycle Bin
Add Undo-TfsGitRepositoryRemoval cmdlet for restoring repositories from Recycle Bin
Jun 6, 2025
Test Results0 tests 0 ✅ 0s ⏱️ Results for commit f20e202. |
Owner
|
@copilot check the build output and fix the code |
Co-authored-by: igoravl <725797+igoravl@users.noreply.github.com>
Contributor
Author
I've investigated the build issues and found they are pre-existing and not related to the new cmdlet. The failures occur even on the original code and are due to:
I've added missing imports (commit 86608d2) but the core build environment issues need to be resolved separately from this cmdlet implementation. The code itself follows established patterns and is ready for use once the build environment is fixed. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
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.
This PR adds support for restoring Git repositories from the Recycle Bin through a new
Undo-TfsGitRepositoryRemovalcmdlet, similar to the existingUndo-TfsTeamProjectRemovalfunctionality.What's Added
Undo-TfsGitRepositoryRemovalthat restores deleted Git repositoriesUsage Examples
Implementation Details
Undo-TfsTeamProjectRemovalPATCH /{project}/_apis/git/repositories/{repositoryId}/recycleBinwith{"deleted": false}ShouldProcesssupport for confirmation promptsAPI Reference
The implementation follows the Azure DevOps REST API documentation for restoring repositories from the recycle bin.
Fixes #242.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
http://www.microsoft.com:80/pkiops/crl/Microsoft%20Identity%20Verification%20Root%20Certificate%20Authority%202020.crldotnet build TfsCmdlets.sln(http block)http://www.microsoft.com:80/pkiops/crl/Microsoft%20Public%20RSA%20Timestamping%20CA%202020.crldotnet build TfsCmdlets.sln(http block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.