Repository navigation
Add Git ref favorites support (list, create, and delete branch favorites) #1630
David Springgay (DavidS-msft)
started this conversation in
Backlog of Suggestions
Replies: 1 comment
|
I have not see this ask from anyone else yet. Will add to the backlog and see if get more requests for it. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
Add Azure DevOps Git ref-favorite operations so agents can discover, favorite, and unfavorite branches before fetching branches that are not advertised to a local enlistment.
Tools
Develop the following operations in the consolidated repository branch tool, or add the repository-domain equivalent, with full documented parameter support.
List ref favorites
Endpoint:
GET https://dev.azure.com/{organization}/{project}/_apis/git/favorites/refs?api-version=7.1Expose the documented optional
repositoryIdandidentityIdparameters.Create a ref favorite
Endpoint:
POST https://dev.azure.com/{organization}/{project}/_apis/git/favorites/refs?api-version=7.1Accept
project,repositoryId, and a full ref name such asrefs/heads/feature/my-branch. Build the documented body withtype: ref.Delete a ref favorite
Endpoint:
DELETE https://dev.azure.com/{organization}/{project}/_apis/git/favorites/refs/{favoriteId}?api-version=7.1Accept
projectandfavoriteId.Use case
Some Azure DevOps/GVFS enlistments do not advertise an indexed branch to local
git fetchuntil the user favorites that branch in Azure DevOps. Today the MCP can list branches andlist_minecan include existing favorites, but it cannot create or remove a favorite. This forces an agent to stop and ask the user to use the web UI before it can continue a deterministic favorite -> fetch -> checkout workflow.Related work
Issue #910 added/listed Git refs and included
includeMyBranches, which can surface branches that are already favorites. It does not provide the mutation needed to create or delete a favorite.Rules
Documentation
All reactions