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 fd5f9623d fix: zentao repo url parse error (#6432)
fd5f9623d is described below
commit fd5f9623db9ca2df466e8411910e957e76d5fa69
Author: abeizn <[email protected]>
AuthorDate: Thu Nov 9 03:17:12 2023 -0600
fix: zentao repo url parse error (#6432)
---
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)