Loading config/ontology/edges/approved.yaml 0 → 100644 +6 −0 Original line number Diff line number Diff line description: User who approved a merge request variants: - from_node: { type: User, id: id } to_node: { type: MergeRequest, id: id } description: "User approved a merge request." config/ontology/edges/approved_by.yamldeleted 100644 → 0 +0 −6 Original line number Diff line number Diff line description: User who approved a merge request variants: - from_node: { type: MergeRequest, id: id } to_node: { type: User, id: id } description: "Merge request was approved by user." config/ontology/nodes/code_review/merge_request.yaml +2 −2 Original line number Diff line number Diff line Loading @@ -157,6 +157,6 @@ etl: array_field: user_id approvals: to: User as: APPROVED_BY direction: outgoing as: APPROVED direction: incoming array_field: user_id config/ontology/schema.yaml +1 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ edges: ASSIGNED: edges/assigned.yaml MERGED_BY: edges/merged_by.yaml CLOSED_BY: edges/closed_by.yaml APPROVED_BY: edges/approved_by.yaml APPROVED: edges/approved.yaml HAS_FILE: edges/has_file.yaml HAS_STAGE: edges/has_stage.yaml HAS_JOB: edges/has_job.yaml Loading config/seeds/data_correctness.sql +9 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,10 @@ -- 4002 Write unit tests (opened, task, not confidential, no weight, path 1/101/) -- 4003 Q1 Objective (opened, epic, not confidential, weight 13, path 1/102/) -- -- APPROVED edges: -- User 2 -> MR 2000, User 3 -> MR 2000 -- User 1 -> MR 2002 -- -- WorkItem edges: -- AUTHORED: User 1 -> WI 4000, User 2 -> WI 4001, User 1 -> WI 4002, User 3 -> WI 4003 -- IN_GROUP: WI 4000 -> Group 100, WI 4001 -> Group 100, WI 4002 -> Group 101, WI 4003 -> Group 102 Loading Loading @@ -195,3 +199,8 @@ INSERT INTO gl_edge (traversal_path, source_id, source_kind, relationship_kind, ('1/100/', 4000, 'WorkItem', 'IN_PROJECT', 1000, 'Project'), ('1/100/', 4001, 'WorkItem', 'IN_PROJECT', 1000, 'Project'), ('1/100/', 2, 'User', 'CLOSED_BY', 4001, 'WorkItem'); INSERT INTO gl_edge (traversal_path, source_id, source_kind, relationship_kind, target_id, target_kind) VALUES ('1/100/1000/', 2, 'User', 'APPROVED', 2000, 'MergeRequest'), ('1/100/1000/', 3, 'User', 'APPROVED', 2000, 'MergeRequest'), ('1/101/1001/', 1, 'User', 'APPROVED', 2002, 'MergeRequest'); Loading
config/ontology/edges/approved.yaml 0 → 100644 +6 −0 Original line number Diff line number Diff line description: User who approved a merge request variants: - from_node: { type: User, id: id } to_node: { type: MergeRequest, id: id } description: "User approved a merge request."
config/ontology/edges/approved_by.yamldeleted 100644 → 0 +0 −6 Original line number Diff line number Diff line description: User who approved a merge request variants: - from_node: { type: MergeRequest, id: id } to_node: { type: User, id: id } description: "Merge request was approved by user."
config/ontology/nodes/code_review/merge_request.yaml +2 −2 Original line number Diff line number Diff line Loading @@ -157,6 +157,6 @@ etl: array_field: user_id approvals: to: User as: APPROVED_BY direction: outgoing as: APPROVED direction: incoming array_field: user_id
config/ontology/schema.yaml +1 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ edges: ASSIGNED: edges/assigned.yaml MERGED_BY: edges/merged_by.yaml CLOSED_BY: edges/closed_by.yaml APPROVED_BY: edges/approved_by.yaml APPROVED: edges/approved.yaml HAS_FILE: edges/has_file.yaml HAS_STAGE: edges/has_stage.yaml HAS_JOB: edges/has_job.yaml Loading
config/seeds/data_correctness.sql +9 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,10 @@ -- 4002 Write unit tests (opened, task, not confidential, no weight, path 1/101/) -- 4003 Q1 Objective (opened, epic, not confidential, weight 13, path 1/102/) -- -- APPROVED edges: -- User 2 -> MR 2000, User 3 -> MR 2000 -- User 1 -> MR 2002 -- -- WorkItem edges: -- AUTHORED: User 1 -> WI 4000, User 2 -> WI 4001, User 1 -> WI 4002, User 3 -> WI 4003 -- IN_GROUP: WI 4000 -> Group 100, WI 4001 -> Group 100, WI 4002 -> Group 101, WI 4003 -> Group 102 Loading Loading @@ -195,3 +199,8 @@ INSERT INTO gl_edge (traversal_path, source_id, source_kind, relationship_kind, ('1/100/', 4000, 'WorkItem', 'IN_PROJECT', 1000, 'Project'), ('1/100/', 4001, 'WorkItem', 'IN_PROJECT', 1000, 'Project'), ('1/100/', 2, 'User', 'CLOSED_BY', 4001, 'WorkItem'); INSERT INTO gl_edge (traversal_path, source_id, source_kind, relationship_kind, target_id, target_kind) VALUES ('1/100/1000/', 2, 'User', 'APPROVED', 2000, 'MergeRequest'), ('1/100/1000/', 3, 'User', 'APPROVED', 2000, 'MergeRequest'), ('1/101/1001/', 1, 'User', 'APPROVED', 2002, 'MergeRequest');