Skip to content

Commit

Permalink
Merge pull request #304 from drone/CODE-1870
Browse files Browse the repository at this point in the history
fix: [CODE-1870]: adding cloneUrl to the convertRepository method for…
  • Loading branch information
karansaraswat19 committed May 6, 2024
2 parents 1255b15 + 9de001d commit 0a0caf1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions scm/driver/azure/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ func convertRepository(from *repository) *scm.Repository {
Name: from.Name,
Link: from.URL,
Branch: scm.TrimRef(from.DefaultBranch),
Clone: from.RemoteURL,
}
}

Expand Down
3 changes: 2 additions & 1 deletion scm/driver/azure/testdata/repo.json.golden
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"ID": "91f0d4cb-4c36-49a5-b28d-2d72da089c4d",
"Name": "test_project",
"Branch": "main",
"Link": "https://dev.azure.com/tphoney/d350c9c0-7749-4ff8-a78f-f9c1f0e56729/_apis/git/repositories/91f0d4cb-4c36-49a5-b28d-2d72da089c4d"
"Link": "https://dev.azure.com/tphoney/d350c9c0-7749-4ff8-a78f-f9c1f0e56729/_apis/git/repositories/91f0d4cb-4c36-49a5-b28d-2d72da089c4d",
"Clone": "https://tphoney@dev.azure.com/tphoney/test_project/_git/test_project"
}
6 changes: 4 additions & 2 deletions scm/driver/azure/testdata/repos.json.golden
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
"ID": "91f0d4cb-4c36-49a5-b28d-2d72da089c4d",
"Name": "test_project",
"Branch": "main",
"Link": "https://dev.azure.com/tphoney/d350c9c0-7749-4ff8-a78f-f9c1f0e56729/_apis/git/repositories/91f0d4cb-4c36-49a5-b28d-2d72da089c4d"
"Link": "https://dev.azure.com/tphoney/d350c9c0-7749-4ff8-a78f-f9c1f0e56729/_apis/git/repositories/91f0d4cb-4c36-49a5-b28d-2d72da089c4d",
"Clone": "https://tphoney@dev.azure.com/tphoney/test_project/_git/test_project"
},
{
"ID": "fde2d21f-13b9-4864-a995-83329045289a",
"Name": "test_repo2",
"Branch": "main",
"Link": "https://dev.azure.com/tphoney/d350c9c0-7749-4ff8-a78f-f9c1f0e56729/_apis/git/repositories/fde2d21f-13b9-4864-a995-83329045289a"
"Link": "https://dev.azure.com/tphoney/d350c9c0-7749-4ff8-a78f-f9c1f0e56729/_apis/git/repositories/fde2d21f-13b9-4864-a995-83329045289a",
"Clone": "https://tphoney@dev.azure.com/tphoney/test_project/_git/test_repo2"
}
]

0 comments on commit 0a0caf1

Please sign in to comment.