You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/10/24 12:17:50 UTC

[GitHub] [incubator-devlake] e2corporation commented on a diff in pull request #3496: Issues/3329 entity

e2corporation commented on code in PR #3496:
URL: https://github.com/apache/incubator-devlake/pull/3496#discussion_r1003244896


##########
config-ui/src/components/blueprints/create-workflow/DataScopes.jsx:
##########
@@ -144,27 +140,22 @@ const DataScopes = (props) => {
                         disabled={isRunning}
                         placeholder='username/repo, username/another-repo'
                         values={
-                          projects[configuredConnection.id]?.map(
-                            (p) => p.value
-                          ) || []
+                          selectedScopeEntities?.map((p) => p.value) || []
                         }
                         fill={true}
                         onChange={(values) =>
-                          setProjects((p) => ({
-                            ...p,
-                            [configuredConnection.id]: [
-                              ...values.map(
-                                (v, vIdx) =>
-                                  new GitHubProject({
-                                    id: v,
-                                    key: v,
-                                    title: v,
-                                    value: v,
-                                    type: 'string'
-                                  })
-                              )
-                            ]
-                          }))
+                          setScopeEntities([
+                            ...values.map(
+                              (v, vIdx) =>
+                                new GitHubProject({

Review Comment:
   This would mean all scope entities are GitHub Projects? Models need to be instantiated by the Provider associated with the entity. ie. `GitHubProject` vs `GitlabProject` vs `JenkinsJob` etc.



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