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

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

mindlesscloud commented on code in PR #4526:
URL: https://github.com/apache/incubator-devlake/pull/4526#discussion_r1119543318


##########
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:
   Thanks for your comment, I will remove it from the new commits



-- 
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