You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2024/05/07 03:19:30 UTC

(incubator-devlake) branch main updated: fix: noShallowClone was overwritten (#7430)

This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 217a36ba9 fix: noShallowClone was overwritten (#7430)
217a36ba9 is described below

commit 217a36ba9073c8eedabd87d67740fb717ce35e2c
Author: Klesh Wong <zh...@merico.dev>
AuthorDate: Tue May 7 11:19:25 2024 +0800

    fix: noShallowClone was overwritten (#7430)
    
    * fix: noShallowClone was overwritten
    
    * fix: unit test
---
 backend/plugins/azuredevops_go/api/blueprint_v200.go      | 12 +++++++-----
 backend/plugins/azuredevops_go/api/blueprint_v200_test.go |  9 +++++----
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/backend/plugins/azuredevops_go/api/blueprint_v200.go b/backend/plugins/azuredevops_go/api/blueprint_v200.go
index 4aa539319..59a587b78 100644
--- a/backend/plugins/azuredevops_go/api/blueprint_v200.go
+++ b/backend/plugins/azuredevops_go/api/blueprint_v200.go
@@ -18,9 +18,10 @@ limitations under the License.
 package api
 
 import (
-	"golang.org/x/exp/slices"
 	"net/url"
 
+	"golang.org/x/exp/slices"
+
 	"github.com/apache/incubator-devlake/core/errors"
 	"github.com/apache/incubator-devlake/core/utils"
 
@@ -178,10 +179,11 @@ func makePipelinePlanV200(
 			stage = append(stage, &coreModels.PipelineTask{
 				Plugin: "gitextractor",
 				Options: map[string]interface{}{
-					"url":    cloneUrl.String(),
-					"name":   azuredevopsRepo.Name,
-					"repoId": didgen.NewDomainIdGenerator(&models.AzuredevopsRepo{}).Generate(connection.ID, azuredevopsRepo.Id),
-					"proxy":  connection.Proxy,
+					"url":            cloneUrl.String(),
+					"name":           azuredevopsRepo.Name,
+					"repoId":         didgen.NewDomainIdGenerator(&models.AzuredevopsRepo{}).Generate(connection.ID, azuredevopsRepo.Id),
+					"proxy":          connection.Proxy,
+					"noShallowClone": true,
 				},
 			})
 		}
diff --git a/backend/plugins/azuredevops_go/api/blueprint_v200_test.go b/backend/plugins/azuredevops_go/api/blueprint_v200_test.go
index 1c1281c62..ceddcda68 100644
--- a/backend/plugins/azuredevops_go/api/blueprint_v200_test.go
+++ b/backend/plugins/azuredevops_go/api/blueprint_v200_test.go
@@ -160,10 +160,11 @@ func TestMakeDataSourcePipelinePlanV200(t *testing.T) {
 			{
 				Plugin: "gitextractor",
 				Options: map[string]interface{}{
-					"proxy":  "",
-					"repoId": expectDomainScopeId,
-					"name":   azureDevOpsProjectName,
-					"url":    "https://git:personal-access-token@this_is_cloneUrl",
+					"proxy":          "",
+					"repoId":         expectDomainScopeId,
+					"name":           azureDevOpsProjectName,
+					"url":            "https://git:personal-access-token@this_is_cloneUrl",
+					"noShallowClone": true,
 				},
 			},
 		},