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

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


The following commit(s) were added to refs/heads/release-v0.19 by this push:
     new e6004778d fix: zentao repo url parse error (#6432) (#6434)
e6004778d is described below

commit e6004778d3df99b1e0892357d79882d13861911e
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Nov 9 03:22:14 2023 -0600

    fix: zentao repo url parse error (#6432) (#6434)
    
    Co-authored-by: abeizn <[email protected]>
---
 backend/plugins/zentao/tasks/bug_commits_extractor.go   | 3 ++-
 backend/plugins/zentao/tasks/story_commits_extractor.go | 3 ++-
 backend/plugins/zentao/tasks/task_commits_extractor.go  | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/backend/plugins/zentao/tasks/bug_commits_extractor.go 
b/backend/plugins/zentao/tasks/bug_commits_extractor.go
index 498e9bb89..6a634557a 100644
--- a/backend/plugins/zentao/tasks/bug_commits_extractor.go
+++ b/backend/plugins/zentao/tasks/bug_commits_extractor.go
@@ -20,6 +20,7 @@ package tasks
 import (
        "encoding/json"
        "net/url"
+       "path"
        "regexp"
 
        "github.com/apache/incubator-devlake/core/errors"
@@ -93,7 +94,7 @@ func ExtractBugCommits(taskCtx plugin.SubTaskContext) 
errors.Error {
                                return nil, errors.Default.WrapRaw(err)
                        }
                        bugCommits.Host = u.Host
-                       bugCommits.RepoRevision = u.Path
+                       bugCommits.RepoRevision = "/" + path.Base(u.Path)
 
                        results := make([]interface{}, 0)
                        results = append(results, bugCommits)
diff --git a/backend/plugins/zentao/tasks/story_commits_extractor.go 
b/backend/plugins/zentao/tasks/story_commits_extractor.go
index 97243db25..4a5d133da 100644
--- a/backend/plugins/zentao/tasks/story_commits_extractor.go
+++ b/backend/plugins/zentao/tasks/story_commits_extractor.go
@@ -20,6 +20,7 @@ package tasks
 import (
        "encoding/json"
        "net/url"
+       "path"
        "regexp"
 
        "github.com/apache/incubator-devlake/core/errors"
@@ -89,7 +90,7 @@ func ExtractStoryCommits(taskCtx plugin.SubTaskContext) 
errors.Error {
                        }
 
                        storyCommits.Host = u.Host
-                       storyCommits.RepoRevision = u.Path
+                       storyCommits.RepoRevision = "/" + path.Base(u.Path)
 
                        results := make([]interface{}, 0)
                        results = append(results, storyCommits)
diff --git a/backend/plugins/zentao/tasks/task_commits_extractor.go 
b/backend/plugins/zentao/tasks/task_commits_extractor.go
index 533df08e7..5f52c3ebc 100644
--- a/backend/plugins/zentao/tasks/task_commits_extractor.go
+++ b/backend/plugins/zentao/tasks/task_commits_extractor.go
@@ -20,6 +20,7 @@ package tasks
 import (
        "encoding/json"
        "net/url"
+       "path"
        "regexp"
 
        "github.com/apache/incubator-devlake/core/errors"
@@ -89,7 +90,7 @@ func ExtractTaskCommits(taskCtx plugin.SubTaskContext) 
errors.Error {
                        }
 
                        taskCommits.Host = u.Host
-                       taskCommits.RepoRevision = u.Path
+                       taskCommits.RepoRevision = "/" + path.Base(u.Path)
 
                        results := make([]interface{}, 0)
                        results = append(results, taskCommits)

Reply via email to