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/05/18 01:29:10 UTC
[GitHub] [incubator-devlake] mindlesscloud opened a new pull request, #5225: feat: collect jira development panel
mindlesscloud opened a new pull request, #5225:
URL: https://github.com/apache/incubator-devlake/pull/5225
### Summary
Fulfill #4304, provide Jira development panel collector and extractor, which will be activated only if the `JiraOptions.ApplicationType` is not empty.
- add `repo_url` to `_tool_jira_issue_commits`
- introduce a new field `ApplicationType` to `JiraOptions`, which will be taken as a request param during collecting development panel
- collect the development panel from the API `https://jirahost/rest/dev-status/1.0/issue/detail?issueId=25184&applicationType=GitLab&dataType=repository` and save to `_raw_jira_api_development_panels`
- extract `commit_url`, `commit_sha` and `repo_url` from raw layer and save to `_tool_jira_issue_commits`
- remove two redundant CSV files
### Does this close any open issues?
Closes #4304
### Screenshots

--
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
[GitHub] [incubator-devlake] abeizn commented on a diff in pull request #5225: feat: collect jira development panel
Posted by "abeizn (via GitHub)" <gi...@apache.org>.
abeizn commented on code in PR #5225:
URL: https://github.com/apache/incubator-devlake/pull/5225#discussion_r1212885241
##########
backend/plugins/jira/tasks/issue_repo_commit_convertor.go:
##########
@@ -97,6 +97,7 @@ func ConvertIssueRepoCommits(taskCtx plugin.SubTaskContext) errors.Error {
item := &crossdomain.IssueRepoCommit{
IssueId: issueIdGenerator.Generate(connectionId, issueCommit.IssueId),
CommitSha: issueCommit.CommitSha,
+ RepoUrl: issueCommit.RepoUrl,
Review Comment:
Some parameters are missing assignments:host, namespace, repo_name

--
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
[GitHub] [incubator-devlake] narrowizard commented on a diff in pull request #5225: feat: collect jira development panel
Posted by "narrowizard (via GitHub)" <gi...@apache.org>.
narrowizard commented on code in PR #5225:
URL: https://github.com/apache/incubator-devlake/pull/5225#discussion_r1197726328
##########
backend/plugins/jira/tasks/development_penal_extractor.go:
##########
@@ -0,0 +1,92 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package tasks
+
+import (
+ "encoding/json"
+
+ "github.com/apache/incubator-devlake/core/errors"
+ "github.com/apache/incubator-devlake/core/plugin"
+ "github.com/apache/incubator-devlake/helpers/pluginhelper/api"
+ "github.com/apache/incubator-devlake/plugins/jira/models"
+ "github.com/apache/incubator-devlake/plugins/jira/tasks/apiv2models"
+)
+
+var _ plugin.SubTaskEntryPoint = ExtractIssues
+
+var ExtractDevelopmentPanelMeta = plugin.SubTaskMeta{
+ Name: "ExtractDevelopmentPanel",
+ EntryPoint: ExtractDevelopmentPanel,
+ EnabledByDefault: true,
Review Comment:
Seems this task is conflicted to `ExtractRemotelinks` logically, I mean that they all write to `_tool_jira_issue_commits`. Should we enable both them by default?
##########
backend/plugins/jira/tasks/task_data.go:
##########
@@ -110,6 +110,8 @@ type JiraOptions struct {
ScopeId string
TransformationRuleId uint64
PageSize int
+ // ApplicationType only used by development panel collector
+ ApplicationType string
Review Comment:
Does this mean that a Jira board only supports one code management platform (SCM application)? In some cases, issues in a Jira board may be linked to commits in different SCM platforms.
--
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
[GitHub] [incubator-devlake] mindlesscloud commented on a diff in pull request #5225: feat: collect jira development panel
Posted by "mindlesscloud (via GitHub)" <gi...@apache.org>.
mindlesscloud commented on code in PR #5225:
URL: https://github.com/apache/incubator-devlake/pull/5225#discussion_r1211240689
##########
backend/plugins/jira/tasks/development_penal_extractor.go:
##########
@@ -0,0 +1,92 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package tasks
+
+import (
+ "encoding/json"
+
+ "github.com/apache/incubator-devlake/core/errors"
+ "github.com/apache/incubator-devlake/core/plugin"
+ "github.com/apache/incubator-devlake/helpers/pluginhelper/api"
+ "github.com/apache/incubator-devlake/plugins/jira/models"
+ "github.com/apache/incubator-devlake/plugins/jira/tasks/apiv2models"
+)
+
+var _ plugin.SubTaskEntryPoint = ExtractIssues
+
+var ExtractDevelopmentPanelMeta = plugin.SubTaskMeta{
+ Name: "ExtractDevelopmentPanel",
+ EntryPoint: ExtractDevelopmentPanel,
+ EnabledByDefault: true,
Review Comment:
Good point! I have disabled both the collector and extractor by default, they can be invoked via the advanced mode.
--
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
[GitHub] [incubator-devlake] mindlesscloud commented on a diff in pull request #5225: feat: collect jira development panel
Posted by "mindlesscloud (via GitHub)" <gi...@apache.org>.
mindlesscloud commented on code in PR #5225:
URL: https://github.com/apache/incubator-devlake/pull/5225#discussion_r1211254281
##########
backend/plugins/jira/tasks/task_data.go:
##########
@@ -110,6 +110,8 @@ type JiraOptions struct {
ScopeId string
TransformationRuleId uint64
PageSize int
+ // ApplicationType only used by development panel collector
+ ApplicationType string
Review Comment:
Yes, for most scenarios, one is enough. Besides, the Jira development panel API is very time costing, we should minimize the number of HTTP requests as much as possible.
--
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
[GitHub] [incubator-devlake] mindlesscloud commented on a diff in pull request #5225: feat: collect jira development panel
Posted by "mindlesscloud (via GitHub)" <gi...@apache.org>.
mindlesscloud commented on code in PR #5225:
URL: https://github.com/apache/incubator-devlake/pull/5225#discussion_r1212986391
##########
backend/plugins/jira/tasks/issue_repo_commit_convertor.go:
##########
@@ -97,6 +97,7 @@ func ConvertIssueRepoCommits(taskCtx plugin.SubTaskContext) errors.Error {
item := &crossdomain.IssueRepoCommit{
IssueId: issueIdGenerator.Generate(connectionId, issueCommit.IssueId),
CommitSha: issueCommit.CommitSha,
+ RepoUrl: issueCommit.RepoUrl,
Review Comment:
they are filled by invoking the function `api.RefineIssueRepoCommit`
--
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
[GitHub] [incubator-devlake] abeizn merged pull request #5225: feat: collect jira development panel
Posted by "abeizn (via GitHub)" <gi...@apache.org>.
abeizn merged PR #5225:
URL: https://github.com/apache/incubator-devlake/pull/5225
--
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