Skip to content

Commit

Permalink
fix: zentao repo url parse error (#6432) (#6434)
Browse files Browse the repository at this point in the history
Co-authored-by: abeizn <zikuan.an@merico.dev>
  • Loading branch information
github-actions[bot] and abeizn committed Nov 9, 2023
1 parent 225ac13 commit e600477
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion backend/plugins/zentao/tasks/bug_commits_extractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package tasks
import (
"encoding/json"
"net/url"
"path"
"regexp"

"github.com/apache/incubator-devlake/core/errors"
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion backend/plugins/zentao/tasks/story_commits_extractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package tasks
import (
"encoding/json"
"net/url"
"path"
"regexp"

"github.com/apache/incubator-devlake/core/errors"
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion backend/plugins/zentao/tasks/task_commits_extractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package tasks
import (
"encoding/json"
"net/url"
"path"
"regexp"

"github.com/apache/incubator-devlake/core/errors"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e600477

Please sign in to comment.