Delete TFVC Azure Devops Branch API - powershell

I'm looking and can't find any TFVC API's, it's all for GIT. I'm needing to delete a branch and then create a new branch from an existing branch in my TFVC repo. Therefore, I'm looking for an API\PowerShell that will accomplish this. I'm wanting an API so that I can add this to my pipeline to perform automatically. PLEASE HELP
Thank you,

There are limited TFVC REST APIs. Branch management is not available via REST.
TFVC is considered feature complete and is not receiving additional investment from Microsoft.
You can use the tf CLI to manage branches, or use the old .NET SOAP client libraries.

Related

Is there any guideline how track changes to an ADF pipeline source code in a Git repository?

I am developing have a few relatively complex ADF pipelines and I like to track my changes.
Traditionally with programming languages I keep my code in a git repository and track changes using branches.
How can I do the same for ADF pipelines? What is the recommended directory structure for ADF code?
Source control of ADF should be what you are looking for. It can track the changes in underlying JSON using git.
It also provides some useful features when you integrate with a Github / Azure DevOps Repo:
"auto" save/commit; every time when you save your work, the change is created as git commit as incremental change and you can easily revert it. In this way, you do not have to publish your changes to persist your changes(In some case like developing a new feature on a feature branch, publishing may not an option)
You can leverage branch protection in Github / Azure DevOps Repo to perform code review, code merge... before publishing the ADF code
But to be honest, from my personal experience, it is not very useful for diff as the JSON does not have any linebreaks and it is hard to find the diff between versions.

Is there a way to manage development of Azure Data Factory using GIT Flow?

Is there a way to manage an azure data factory dev environment with azure DevOps Git integration with GitFlow branching model like https://nvie.com/posts/a-successful-git-branching-model/
Especially how to deal with hot fixes??
If you're writing explicitly versioned software or need to support many versions of your product in the field, git-flow is the way to go.
At this point we could see an Azure Repos Git organization can have numerous repositories, but each repository can only relate to one data factory hence, you cannot maintain multiple versions of ADF in single repository or branch.
If your intention is to maintain multiple versions of ADF on single repo/ master branch using GIT flow, then it is not yet possible. Source control - Azure Data Factory | Microsoft Docs

Solution to use Azure DevOps SDK for Git functions

I am searching for a solution where I can use Azure DevOps SDK to view repositories, branch, commit, etc. like a Blazor or other .NET platforms like WinForm.
Before I start mucking with the SDK and create an application using the APIs, for example, I would rather purchase or use a solution that is already out there without re-inventing the wheel.
I would be interested in any solution that someone had already tried or a paid solution.
Thanking you in advance.
I am searching for a solution where I can use Azure DevOps SDK to view repositories, branch, commit
List all repositories via Azure DevOps REST API
GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories?api-version=6.1-preview.1
List branch via repo name
GET https://dev.azure.com/{Org name}/{project name}/_apis/git/repositories/{repo name or repo ID}/refs?filter=heads&api-version=6.1-preview.1
Retrieve git commits for a project
GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/commits?api-version=6.1-preview.1

Transfering the data from TFS to GitHUb

Our client is using TFS, and we are using GitHub
I would like to sync the projects from TFS to Github and from GItHub to TFS as batch process whenever the changes are made in either of them.
Can someone suggest easiest way of doing the same?
Thanks in advance
git-tfs which is a two-way bridge between TFS (Team Foundation Server) and git. However if you are using TFS2013 and later, you could use Git as the source control option. You could directly use normal git command such as git pull, git push.
For the command to the get from github, just use the normal git command such as: git-scm.com/docs/git-pull –
In Azure Devops or Github, both of them use git as their Version Control, so you can have both as separate git remotes.
You could just use some git commands to handle this. Which command please take a look at this blog.
For automated process, then you could use one CI build definition to achieve it. Detail steps as below:
Create a CI build with a PowerShell or cmd Task;
Select the VSTS git repo in Get sources step;
Enable continuous integration andspecify include all branches for
Branch filters:
Two samples for your reference:
How to synchronize VSTS and Github respositories when commits are made
Syncing my Github repo to MS Visual Studio Team Services
Besides, you could also use some 3-rd party extension to handle this, such as this one--Git Tools for Azure DevOps
Azure Pipelines Build and Release extension that helps you synchronise one Git Repository with another.
You can use this extension with any Git repository: TFS, GitHub, Azure DevOps, Git, etc.

VSTS-GITHUB Workflow

Please elaborate the steps to create a workflow of Visual
Studio Team Services and Github.
Integration of Github with VSTS and creating a workflow.
Once we create user stories in vsts, is there any way to create a
transition from one state to another(New->Active->resolved),
based on repository update(github).
There is a way to transition from on state to another when github repo is update:
Create a CI build definition for the github repo.
Add a power shell task to change the stories state.
But usually user stories are linked with repo on VSTS not github, that’s more useful and meaningful.
Automatically is only using VSTS git repo.
If you like update this, you need to create a manual integration, possible using the VSTS Rest Api.