pln-planning-tools / Starmap

Roadmap Planning Tool
https://starmap.site
Other
20 stars 8 forks source link

bug: no children found on probelab root issue #366

Closed SgtPooki closed 1 year ago

SgtPooki commented 1 year ago

prod link: https://starmap.site/roadmap/github.com/protocol/probelab/issues/1#simple

issue link: https://github.com/protocol/probelab/issues/1

image

Reported in slack: https://filecoinproject.slack.com/archives/C0418TBQ9CH/p1683799557680159

SgtPooki commented 1 year ago

reproducible locally:

Error: No children found, is this a root issue?
    at handler (webpack-internal:///(api)/./pages/api/roadmap.ts:71:17)
    at async Object.apiResolver (/Users/sgtpooki/code/work/protocol.ai/pln-planning-tools/Starmaps/node_modules/next/dist/server/api-utils/node.js:366:9)
    at async DevServer.runApi (/Users/sgtpooki/code/work/protocol.ai/pln-planning-tools/Starmaps/node_modules/next/dist/server/next-server.js:481:9)
    at async Object.fn (/Users/sgtpooki/code/work/protocol.ai/pln-planning-tools/Starmaps/node_modules/next/dist/server/next-server.js:741:37)
    at async Router.execute (/Users/sgtpooki/code/work/protocol.ai/pln-planning-tools/Starmaps/node_modules/next/dist/server/router.js:252:36)
    at async DevServer.run (/Users/sgtpooki/code/work/protocol.ai/pln-planning-tools/Starmaps/node_modules/next/dist/server/base-server.js:365:29)
    at async DevServer.run (/Users/sgtpooki/code/work/protocol.ai/pln-planning-tools/Starmaps/node_modules/next/dist/server/dev/next-dev-server.js:709:20)
    at async DevServer.handleRequest (/Users/sgtpooki/code/work/protocol.ai/pln-planning-tools/Starmaps/node_modules/next/dist/server/base-server.js:303:20)
SgtPooki commented 1 year ago

raw issue.ts response:

{
  "html_url": "https://github.com/protocol/probelab/issues/1",
  "title": "ProbeLab 2023 Roadmap",
  "state": "open",
  "node_id": "I_kwDOIgBDrc5XRnDu",
  "body_html": "<p dir=\"auto\">Title: ProbeLab 2023 Roadmap</p>\n<p dir=\"auto\">Children:</p>\n<ul dir=\"auto\">\n<li><a class=\"issue-link js-issue-link\" data-error-text=\"Failed to load title\" data-id=\"1464239539\" data-permission-text=\"Title is private\" data-url=\"https://github.com/protocol/probelab/issues/2\" data-hovercard-type=\"issue\" data-hovercard-url=\"/protocol/probelab/issues/2/hovercard\" href=\"https://github.com/protocol/probelab/issues/2\">#2</a> - 2022-12-31</li>\n<li><a class=\"issue-link js-issue-link\" data-error-text=\"Failed to load title\" data-id=\"1464247542\" data-permission-text=\"Title is private\" data-url=\"https://github.com/protocol/probelab/issues/3\" data-hovercard-type=\"issue\" data-hovercard-url=\"/protocol/probelab/issues/3/hovercard\" href=\"https://github.com/protocol/probelab/issues/3\">#3</a> - 2023-02-24</li>\n<li><a class=\"issue-link js-issue-link\" data-error-text=\"Failed to load title\" data-id=\"1464250751\" data-permission-text=\"Title is private\" data-url=\"https://github.com/protocol/probelab/issues/4\" data-hovercard-type=\"issue\" data-hovercard-url=\"/protocol/probelab/issues/4/hovercard\" href=\"https://github.com/protocol/probelab/issues/4\">#4</a> - 2023-03-30</li>\n<li><a class=\"issue-link js-issue-link\" data-error-text=\"Failed to load title\" data-id=\"1464251881\" data-permission-text=\"Title is private\" data-url=\"https://github.com/protocol/probelab/issues/5\" data-hovercard-type=\"issue\" data-hovercard-url=\"/protocol/probelab/issues/5/hovercard\" href=\"https://github.com/protocol/probelab/issues/5\">#5</a> - 2023-03-30</li>\n<li><a class=\"issue-link js-issue-link\" data-error-text=\"Failed to load title\" data-id=\"1464259109\" data-permission-text=\"Title is private\" data-url=\"https://github.com/protocol/probelab/issues/6\" data-hovercard-type=\"issue\" data-hovercard-url=\"/protocol/probelab/issues/6/hovercard\" href=\"https://github.com/protocol/probelab/issues/6\">#6</a> - 2023-04-30</li>\n<li><a class=\"issue-link js-issue-link\" data-error-text=\"Failed to load title\" data-id=\"1464261197\" data-permission-text=\"Title is private\" data-url=\"https://github.com/protocol/probelab/issues/7\" data-hovercard-type=\"issue\" data-hovercard-url=\"/protocol/probelab/issues/7/hovercard\" href=\"https://github.com/protocol/probelab/issues/7\">#7</a> - 2023-05-30</li>\n<li><a class=\"issue-link js-issue-link\" data-error-text=\"Failed to load title\" data-id=\"1464262270\" data-permission-text=\"Title is private\" data-url=\"https://github.com/protocol/probelab/issues/8\" data-hovercard-type=\"issue\" data-hovercard-url=\"/protocol/probelab/issues/8/hovercard\" href=\"https://github.com/protocol/probelab/issues/8\">#8</a> - 2023-06-30</li>\n<li><a class=\"issue-link js-issue-link\" data-error-text=\"Failed to load title\" data-id=\"1464263215\" data-permission-text=\"Title is private\" data-url=\"https://github.com/protocol/probelab/issues/9\" data-hovercard-type=\"issue\" data-hovercard-url=\"/protocol/probelab/issues/9/hovercard\" href=\"https://github.com/protocol/probelab/issues/9\">#9</a> - 2023-09-30</li>\n</ul>",
  "body": "Title: ProbeLab 2023 Roadmap\r\n\r\nChildren:\r\n- https://github.com/protocol/probelab/issues/2 - 2022-12-31\r\n- https://github.com/protocol/probelab/issues/3 - 2023-02-24\r\n- https://github.com/protocol/probelab/issues/4 - 2023-03-30\r\n- https://github.com/protocol/probelab/issues/5 - 2023-03-30\r\n- https://github.com/protocol/probelab/issues/6 - 2023-04-30\r\n- https://github.com/protocol/probelab/issues/7 - 2023-05-30\r\n- https://github.com/protocol/probelab/issues/8 - 2023-06-30\r\n- https://github.com/protocol/probelab/issues/9 - 2023-09-30",
  "labels": [
    "starmaps"
  ],
  "description": ""
}
AlexxNica commented 1 year ago

@SgtPooki could it be that the parser is trying to look for children under the Title: from the issue's body instead of Children: from https://github.com/protocol/probelab/issues/1?

SgtPooki commented 1 year ago

It seems like the post-fixed dates are the problem:

https://github.com/pln-planning-tools/Starmap/blob/aaa90cde1a5fc43bfae454245d50778e11bf880c/lib/parser.ts#L130

is returning

lines:  [
        '2022-12-31',
        '2023-02-24',
        '2023-03-30',
        '2023-03-30',
        '2023-04-30',
        '2023-05-30',
        '2023-06-30',
        '2023-09-30'
      ]
SgtPooki commented 1 year ago

the PR with fix is out at https://github.com/pln-planning-tools/Starmap/pull/367, please check the vercel preview link and test that this is working as expected :)