{"action":"created","issue":{"url":"https://api.github.com/repos/marmoym/marmoym/issues/58","repository_url":"https://api.github.com/repos/marmoym/marmoym","labels_url":"https://api.github.com/repos/marmoym/marmoym/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/marmoym/marmoym/issues/58/comments","events_url":"https://api.github.com/repos/marmoym/marmoym/issues/58/events","html_url":"https://github.com/marmoym/marmoym/issues/58","id":324070471,"node_id":"MDU6SXNzdWUzMjQwNzA0NzE=","number":58,"title":"child comment managing","user":{"login":"eldeni","id":13134658,"node_id":"MDQ6VXNlcjEzMTM0NjU4","avatar_url":"https://avatars3.githubusercontent.com/u/13134658?v=4","gravatar_id":"","url":"https://api.github.com/users/eldeni","html_url":"https://github.com/eldeni","followers_url":"https://api.github.com/users/eldeni/followers","following_url":"https://api.github.com/users/eldeni/following{/other_user}","gists_url":"https://api.github.com/users/eldeni/gists{/gist_id}","starred_url":"https://api.github.com/users/eldeni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eldeni/subscriptions","organizations_url":"https://api.github.com/users/eldeni/orgs","repos_url":"https://api.github.com/users/eldeni/repos","events_url":"https://api.github.com/users/eldeni/events{/privacy}","received_events_url":"https://api.github.com/users/eldeni/received_events","type":"User","site_admin":false},"labels":[{"id":886387693,"node_id":"MDU6TGFiZWw4ODYzODc2OTM=","url":"https://api.github.com/repos/marmoym/marmoym/labels/proposal","name":"proposal","color":"d876e3","default":false}],"state":"open","locked":false,"assignee":{"login":"eldeni","id":13134658,"node_id":"MDQ6VXNlcjEzMTM0NjU4","avatar_url":"https://avatars3.githubusercontent.com/u/13134658?v=4","gravatar_id":"","url":"https://api.github.com/users/eldeni","html_url":"https://github.com/eldeni","followers_url":"https://api.github.com/users/eldeni/followers","following_url":"https://api.github.com/users/eldeni/following{/other_user}","gists_url":"https://api.github.com/users/eldeni/gists{/gist_id}","starred_url":"https://api.github.com/users/eldeni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eldeni/subscriptions","organizations_url":"https://api.github.com/users/eldeni/orgs","repos_url":"https://api.github.com/users/eldeni/repos","events_url":"https://api.github.com/users/eldeni/events{/privacy}","received_events_url":"https://api.github.com/users/eldeni/received_events","type":"User","site_admin":false},"assignees":[{"login":"eldeni","id":13134658,"node_id":"MDQ6VXNlcjEzMTM0NjU4","avatar_url":"https://avatars3.githubusercontent.com/u/13134658?v=4","gravatar_id":"","url":"https://api.github.com/users/eldeni","html_url":"https://github.com/eldeni","followers_url":"https://api.github.com/users/eldeni/followers","following_url":"https://api.github.com/users/eldeni/following{/other_user}","gists_url":"https://api.github.com/users/eldeni/gists{/gist_id}","starred_url":"https://api.github.com/users/eldeni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eldeni/subscriptions","organizations_url":"https://api.github.com/users/eldeni/orgs","repos_url":"https://api.github.com/users/eldeni/repos","events_url":"https://api.github.com/users/eldeni/events{/privacy}","received_events_url":"https://api.github.com/users/eldeni/received_events","type":"User","site_admin":false},{"login":"UnoRich","id":13329342,"node_id":"MDQ6VXNlcjEzMzI5MzQy","avatar_url":"https://avatars3.githubusercontent.com/u/13329342?v=4","gravatar_id":"","url":"https://api.github.com/users/UnoRich","html_url":"https://github.com/UnoRich","followers_url":"https://api.github.com/users/UnoRich/followers","following_url":"https://api.github.com/users/UnoRich/following{/other_user}","gists_url":"https://api.github.com/users/UnoRich/gists{/gist_id}","starred_url":"https://api.github.com/users/UnoRich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UnoRich/subscriptions","organizations_url":"https://api.github.com/users/UnoRich/orgs","repos_url":"https://api.github.com/users/UnoRich/repos","events_url":"https://api.github.com/users/UnoRich/events{/privacy}","received_events_url":"https://api.github.com/users/UnoRich/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-05-17T15:19:13Z","updated_at":"2018-06-03T11:34:10Z","closed_at":null,"author_association":"MEMBER","body":"```javascript\r\n\r\n// 'definition' => article\r\n`\r\n  select * \r\n  from comments \r\n  where 1 = 1\r\n    and definition_id = {defId}\r\n    and depth between 1 and 4\r\n  order by depth desc;\r\n`\r\n\r\n`\r\n  select *\r\n  from comment_path\r\n  where 1 = 1\r\n    and definition_id = {defId}\r\n`\r\n\r\nconst already = {\r\n  1, 3, 2, 7, 8, \r\n}\r\n\r\nlet result = [{1}, {8} ,{3} ...];\r\nconst Comp = (result) => {\r\n  return result.map((r) => {\r\n    return <div>{r}</div>\r\n  })\r\n}\r\n\r\n// A\r\nfor (var key in obj) {\r\n  var data = obj[key];\r\n  if (!already.includes(key)) {\r\n    result.push(data);\r\n    if (data.children.length) {\r\n      for (let i = 0; i < data.children.length; i++) {\r\n        obj[i] // A\r\n      }\r\n    }\r\n  }\r\n}\r\n\r\n[\r\n  \r\n]\r\n\r\n\r\n\r\n\r\n{\r\n  1: {\r\n    children: [8, 3]\r\n    depth: 1,\r\n    label: 'abab',\r\n    vote: 3,\r\n  },\r\n  8: {\r\n    children: [8, 3]\r\n    depth: 1,\r\n    label: 'abab',\r\n    vote: 3,\r\n  },\r\n  3: {\r\n    children: [2, 7],\r\n  },\r\n}\r\n\r\n`\r\n4\r\n10\r\n1\r\n4\r\n5\r\n6\r\n11\r\n7\r\n8\r\n`\r\n\r\n`\r\n  select *\r\n  from commentChild\r\n  where def = {}\r\n    depth between 0 and 3\r\n    group by commentId\r\n  limit 50\r\n`\r\n\r\n`\r\n1 => [8, 3, 5, 7]\r\n2 => [74, 32, 14, 22]\r\n`\r\n\r\nconst arr = [ \r\n  {\r\n    children: []\r\n  },\r\n  {\r\n    \r\n  },\r\n  {\r\n    \r\n  },\r\n];\r\n\r\n\r\ncommentChild\r\ndefinitionId commentId childId depth\r\n12 1 8 2\r\n12 1 3 3 \r\n12 1 5 4 \r\n12 1 7 1\r\n\r\n{\r\n  1\r\n  chilren: [ 8, 3, 5, 7 ]\r\n}\r\n\r\n\r\n`\r\n- 1\r\n  - 8 \r\n  - 3 \r\n    - 11\r\n    - 6\r\n  - 5\r\n  - 7\r\n    - 2\r\n    - 9\r\n      - 10\r\n        - 4\r\n`\r\n\r\n\r\n// comment 'path' => score update\r\n`\r\n  depth 0 = = =\r\n`\r\n\r\nconst comments = [\r\n  {\r\n    depth: 0,\r\n    id: 2323,\r\n    parentCommentId: undefined,\r\n    label: 'abab',\r\n  },\r\n  {\r\n    depth: 1,\r\n    parentCommentId: 2323,\r\n    label: 'abab',\r\n  },\r\n  {\r\n    depth: 1,\r\n    parentCommentId: 2323,\r\n    label: 'abab',\r\n  },\r\n  {\r\n    depth: 2,\r\n    label: 'abab',\r\n  },\r\n  {\r\n    depth: 0,\r\n    label: 'abab',\r\n  },\r\n  {\r\n    depth: 0,\r\n    label: 'abab',\r\n  },\r\n\r\n];\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/marmoym/marmoym/issues/comments/394155924","html_url":"https://github.com/marmoym/marmoym/issues/58#issuecomment-394155924","issue_url":"https://api.github.com/repos/marmoym/marmoym/issues/58","id":394155924,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDE1NTkyNA==","user":{"login":"eldeni","id":13134658,"node_id":"MDQ6VXNlcjEzMTM0NjU4","avatar_url":"https://avatars3.githubusercontent.com/u/13134658?v=4","gravatar_id":"","url":"https://api.github.com/users/eldeni","html_url":"https://github.com/eldeni","followers_url":"https://api.github.com/users/eldeni/followers","following_url":"https://api.github.com/users/eldeni/following{/other_user}","gists_url":"https://api.github.com/users/eldeni/gists{/gist_id}","starred_url":"https://api.github.com/users/eldeni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eldeni/subscriptions","organizations_url":"https://api.github.com/users/eldeni/orgs","repos_url":"https://api.github.com/users/eldeni/repos","events_url":"https://api.github.com/users/eldeni/events{/privacy}","received_events_url":"https://api.github.com/users/eldeni/received_events","type":"User","site_admin":false},"created_at":"2018-06-03T11:34:10Z","updated_at":"2018-06-03T11:34:10Z","author_association":"MEMBER","body":"https://www.slideshare.net/billkarwin/models-for-hierarchical-data"}}
{"actor":{"display_login":"eldeni"}}