You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "mappjzc (via GitHub)" <gi...@apache.org> on 2023/02/27 10:24:03 UTC

[GitHub] [incubator-devlake] mappjzc commented on a diff in pull request #4526: Extract repo from Jira issue remotelink

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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org