Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support children via GitHub Taskslist #315

Conversation

SgtPooki
Copy link
Contributor

@SgtPooki SgtPooki commented Feb 11, 2023

Example issue using tasklists: ipfs/ipfs-gui#106

Note that it's milestone children are not using tasklists, and their children are still recognized properly.

demo: https://starmaps-git-313-add-support-for-parsing-tas-282722-ipfs-ignite.vercel.app/roadmap/github.com/ipfs/ipfs-gui/issues/106#simple

@SgtPooki SgtPooki linked an issue Feb 11, 2023 that may be closed by this pull request
@vercel
Copy link

vercel bot commented Feb 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
starmaps ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 16, 2023 at 10:25PM (UTC)

* This function must support recognizing the current issue's organization and repo, because some children may simply be "#43" instead of a github short-id such as "org/repo#43"
* @param {string} issue
*/
function getChildrenNew(issue: Pick<GithubIssueData, 'body' | 'html_url'>): ParserGetChildrenResponse[] {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function getChildrenNew has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your cognitive complexity is so small, an ant couldn't see it.

* This function must support recognizing the current issue's organization and repo, because some children may simply be "#43" instead of a github short-id such as "org/repo#43"
* @param {string} issue
*/
function getChildrenNew(issue: Pick<GithubIssueData, 'body' | 'html_url'>): ParserGetChildrenResponse[] {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function getChildrenNew has 31 lines of code (exceeds 25 allowed). Consider refactoring.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your lines of code are so large, their gravitational pull knocked me off my chair.

Copy link
Collaborator

@whizzzkid whizzzkid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits.

lib/parser.ts Outdated Show resolved Hide resolved
lib/parser.ts Show resolved Hide resolved
lib/parser.ts Outdated Show resolved Hide resolved
lib/parser.ts Outdated Show resolved Hide resolved
pages/api/roadmap.ts Show resolved Hide resolved
lib/parser.ts Show resolved Hide resolved
@SgtPooki SgtPooki merged commit b3d13d9 into main Feb 16, 2023
@SgtPooki SgtPooki deleted the 313-add-support-for-parsing-tasklists-check-first-prior-to-children branch February 16, 2023 23:49
AlexxNica added a commit that referenced this pull request Feb 19, 2023
AlexxNica added a commit that referenced this pull request Feb 19, 2023
… (#326)

This reverts the PR #315, commit b3d13d9 to fix roadmaps not loading.
Fixes #324
whizzzkid added a commit that referenced this pull request Feb 21, 2023
* main:
  feat: support children via GitHub Taskslist (#315)
@SgtPooki SgtPooki mentioned this pull request Feb 21, 2023
SgtPooki added a commit that referenced this pull request Feb 21, 2023
SgtPooki added a commit that referenced this pull request Feb 21, 2023
* Revert "Revert "feat: support children via GitHub Taskslist (#315)" to fix #324 (#326)"

This reverts commit 4a93ba2.

fixes #324
fixes #313

* test: add test to confirm failure in #324

* fix: failure when parsing non-child link in issue.body

* chore: address codeclimate comments

* test: ensure children link parsing handles markdown links

* fix: parsing markdown links in children

* fix: more issues parsing additional links as children

* chore: parse children links with for loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants