mappjzc commented on code in PR #4526:
URL:
https://github.com/apache/incubator-devlake/pull/4526#discussion_r1118541443
##########
backend/plugins/jira/tasks/issue_repo_commit_convertor.go:
##########
@@ -83,8 +97,8 @@ func ConvertIssueRepoCommits(taskCtx plugin.SubTaskContext)
errors.Error {
InputRowType: reflect.TypeOf(models.JiraIssueCommit{}),
Input: cursor,
Convert: func(inputRow interface{}) ([]interface{},
errors.Error) {
- var result []interface{}
issueCommit := inputRow.(*models.JiraIssueCommit)
+ fmt.Println(*issueCommit)
Review Comment:
here better to user log?
##########
backend/plugins/jira/tasks/issue_repo_commit_convertor.go:
##########
@@ -105,3 +119,26 @@ func ConvertIssueRepoCommits(taskCtx
plugin.SubTaskContext) errors.Error {
return converter.Execute()
}
+
+func refineIssueRepoCommit(item *crossdomain.IssueRepoCommit, repoPatterns
[]*regexp.Regexp, commitUrl string) *crossdomain.IssueRepoCommit {
+ u, err := url.Parse(commitUrl)
+ if err != nil {
+ return item
+ }
+ item.Host = u.Host
+ for _, pattern := range repoPatterns {
+ if pattern.MatchString(commitUrl) {
+ group := pattern.FindStringSubmatch(commitUrl)
+ fmt.Println(group)
Review Comment:
here better to use log?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]