berzniz / berzniz/github_pr_tree

calculateTree() runs forever if PR has 1000+ files

Open
#138 5 comments 1 reaction 0 assignees View on GitHub
Dominant language
HTML
Stars
696
Forks
79
PR merge metrics
No merged PRs in 30d

Description

In index.tsx calculateTree() you parseInt the contents of `files_tab_counter`, but GitHub formats it with a comma (e.g. 1024 -> "1,024"), so parseInt returns the value before the first comma.

As a result, count is always greater than fileCount and we retrigger calculateTree over and over again:
```
if (fileCount !== count) {
setTimeout(this.calculateTree.bind(this), 100)
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.