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

hez 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 369e9049d fix: bitbucket git-extractor now uses correct credentials 
for cloning repos (#4137)
369e9049d is described below

commit 369e9049d2b7cf8a43beca9e56a3ab229037b7f5
Author: Keon Amini <[email protected]>
AuthorDate: Fri Jan 6 13:29:27 2023 -0600

    fix: bitbucket git-extractor now uses correct credentials for cloning repos 
(#4137)
---
 plugins/bitbucket/api/blueprint.go      | 2 +-
 plugins/bitbucket/api/blueprint_test.go | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/bitbucket/api/blueprint.go 
b/plugins/bitbucket/api/blueprint.go
index 022b6c62d..1deb73768 100644
--- a/plugins/bitbucket/api/blueprint.go
+++ b/plugins/bitbucket/api/blueprint.go
@@ -142,7 +142,7 @@ func makePipelinePlan(subtaskMetas []core.SubTaskMeta, 
scope []*core.BlueprintSc
                        if err != nil {
                                return nil, err
                        }
-                       cloneUrl.User = url.UserPassword(op.Owner, 
connection.Password)
+                       cloneUrl.User = url.UserPassword(connection.Username, 
connection.Password)
                        stage = append(stage, &core.PipelineTask{
                                Plugin: "gitextractor",
                                Options: map[string]interface{}{
diff --git a/plugins/bitbucket/api/blueprint_test.go 
b/plugins/bitbucket/api/blueprint_test.go
index 0e2e09321..0ac17112c 100644
--- a/plugins/bitbucket/api/blueprint_test.go
+++ b/plugins/bitbucket/api/blueprint_test.go
@@ -123,7 +123,7 @@ func TestMakePipelinePlan(t *testing.T) {
                                Plugin: "gitextractor",
                                Options: map[string]interface{}{
                                        "repoId": 
"bitbucket:BitbucketRepo:1:thenicetgp/lake",
-                                       "url":    
"https://thenicetgp:[email protected]/thenicetgp/lake.git";,
+                                       "url":    
"https://Username:[email protected]/thenicetgp/lake.git";,
                                },
                        },
                },

Reply via email to