likyh commented on code in PR #3356:
URL: https://github.com/apache/incubator-devlake/pull/3356#discussion_r991347064


##########
config-ui/src/hooks/useDataScopesManager.jsx:
##########
@@ -365,38 +365,64 @@ function useDataScopesManager({
 
   const getGithubProjects = useCallback(
     (c) =>
-      [Providers.GITHUB].includes(c.plugin)
-        ? c.scope.map(
-            (s) =>
-              new GitHubProject({
-                id: `${s.options?.owner}/${s.options?.repo}`,
-                key: `${s.options?.owner}/${s.options?.repo}`,
-                owner: s.options?.owner,
-                repo: s.options?.repo,
-                value: `${s.options?.owner}/${s.options?.repo}`,
-                title: `${s.options?.owner}/${s.options?.repo}`
-              })
-          )
-        : [],
+      c.scope.map(
+        (s) =>
+          new GitHubProject({
+            id: `${s.options?.owner}/${s.options?.repo}`,
+            key: `${s.options?.owner}/${s.options?.repo}`,
+            owner: s.options?.owner,
+            repo: s.options?.repo,
+            value: `${s.options?.owner}/${s.options?.repo}`,
+            title: `${s.options?.owner}/${s.options?.repo}`
+          })
+      ),
     []
   )
 
   const getGitlabProjects = useCallback(
     (c) =>
-      [Providers.GITLAB].includes(c.plugin)
-        ? c.scope.map(
-            (s) =>
-              new GitlabProject({
-                id: s.options?.projectId,
-                key: s.options?.projectId,
-                value: s.options?.projectId,
-                title: s.options?.title || `Project ${s.options?.projectId}`
-              })
-          )
-        : [],
+      c.scope.map(
+        (s) =>
+          new GitlabProject({
+            id: s.options?.projectId,
+            key: s.options?.projectId,
+            value: s.options?.projectId,
+            title: s.options?.title || `Project ${s.options?.projectId}`
+          })
+      ),
+    []
+  )
+
+  const getJenkinsProjects = useCallback(
+    (c) =>
+      c.scope.map(
+        (s) =>
+          new GitlabProject({

Review Comment:
   I'll use JenkinsJob now. And I'll fix them to extend the base model when 
merge project and board.



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

Reply via email to