Skip to content

Commit

Permalink
fix(customize): issue_repo_commit.host column ignores port, consistan…
Browse files Browse the repository at this point in the history
…t with devinsights change. (#7094)
  • Loading branch information
leric authored Mar 6, 2024
1 parent b5a41a9 commit a364804
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func RefineIssueRepoCommit(item *crossdomain.IssueRepoCommit, repoPatterns []*re
if err != nil {
return item
}
item.Host = u.Host
item.Host = u.Hostname()
for _, pattern := range repoPatterns {
if pattern.MatchString(commitUrl) {
group := pattern.FindStringSubmatch(commitUrl)
Expand Down
2 changes: 1 addition & 1 deletion backend/plugins/tapd/tasks/bug_commit_converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func ConvertBugCommit(taskCtx plugin.SubTaskContext) errors.Error {
IssueId: issueIdGen.Generate(data.Options.ConnectionId, toolL.BugId),
RepoUrl: repoUrl,
CommitSha: toolL.CommitId,
Host: u.Host,
Host: u.Hostname(),
Namespace: getRepoNamespaceFromUrlPath(u.Path),
RepoName: getRepoNameFromUrlPath(u.Path),
}
Expand Down
2 changes: 1 addition & 1 deletion backend/plugins/tapd/tasks/story_commit_converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func ConvertStoryCommit(taskCtx plugin.SubTaskContext) errors.Error {
IssueId: issueIdGen.Generate(data.Options.ConnectionId, toolL.StoryId),
RepoUrl: repoUrl,
CommitSha: toolL.CommitId,
Host: u.Host,
Host: u.Hostname(),
Namespace: getRepoNamespaceFromUrlPath(u.Path),
RepoName: getRepoNameFromUrlPath(u.Path),
}
Expand Down
2 changes: 1 addition & 1 deletion backend/plugins/tapd/tasks/task_commit_converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func ConvertTaskCommit(taskCtx plugin.SubTaskContext) errors.Error {
IssueId: issueIdGen.Generate(data.Options.ConnectionId, toolL.TaskId),
RepoUrl: repoUrl,
CommitSha: toolL.CommitId,
Host: u.Host,
Host: u.Hostname(),
Namespace: getRepoNamespaceFromUrlPath(u.Path),
RepoName: getRepoNameFromUrlPath(u.Path),
}
Expand Down
2 changes: 1 addition & 1 deletion backend/plugins/zentao/tasks/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func parseRepoUrl(repoUrl string) (string, string, string, error) {
return "", "", "", err
}

host := parsedUrl.Host
host := parsedUrl.Hostname()
host = strings.TrimPrefix(host, "www.")
pathParts := strings.Split(parsedUrl.Path, "/")
if len(pathParts) < 3 {
Expand Down

0 comments on commit a364804

Please sign in to comment.