Bug Description
In src/services/github.js, fetchContributors(), fetchIssues(), and fetchPulls() spread the response from fetchWithCache() directly into an array using all.push(...data).
However, several GitHub API endpoints return non-array JSON objects or 204 No Content responses under valid conditions:
- Querying issues for repositories where issues are disabled returns
{ "message": "Issues are disabled in this repository" }.
- Querying contributors for empty repositories returns
{ "message": "Git Repository is empty." } or HTTP 204 No Content.
- Querying restricted repositories returns warning/error payload objects.
When data is a non-array object, all.push(...data) throws an uncaught JavaScript error:
TypeError: data is not iterable (or SyntaxError: Unexpected end of JSON input), causing the data fetching pipeline to crash and stall.
Where the Bug Occurs
src/services/github.js (lines 55-83): fetchWithCache attempts res.json() on 204 No Content responses without checking status.
src/services/github.js (lines 101-135): fetchContributors(), fetchIssues(), and fetchPulls() execute all.push(...data) without validating Array.isArray(data).
Expected Behavior
fetchWithCache() should handle 204 No Content responses gracefully (e.g. returning []).
fetchContributors(), fetchIssues(), and fetchPulls() should check if (Array.isArray(data)) before spreading into all.push(...data), and break gracefully if data is not an array.
Steps to Reproduce
- Run
explore() on an organization that has repositories with disabled issues or empty repositories.
- Observe the browser console.
- The fetch pipeline encounters
TypeError: data is not iterable and fails to complete analytics aggregation.
Note
Please do not post AI-generated spam or generic template comments on this issue.
Logs and Screenshots
No response
Environment Details
No response
Impact
High - Major feature is broken
Code of Conduct
Bug Description
In
src/services/github.js,fetchContributors(),fetchIssues(), andfetchPulls()spread the response fromfetchWithCache()directly into an array usingall.push(...data).However, several GitHub API endpoints return non-array JSON objects or 204 No Content responses under valid conditions:
{ "message": "Issues are disabled in this repository" }.{ "message": "Git Repository is empty." }or HTTP 204 No Content.When
datais a non-array object,all.push(...data)throws an uncaught JavaScript error:TypeError: data is not iterable(orSyntaxError: Unexpected end of JSON input), causing the data fetching pipeline to crash and stall.Where the Bug Occurs
src/services/github.js(lines 55-83):fetchWithCacheattemptsres.json()on 204 No Content responses without checking status.src/services/github.js(lines 101-135):fetchContributors(),fetchIssues(), andfetchPulls()executeall.push(...data)without validatingArray.isArray(data).Expected Behavior
fetchWithCache()should handle 204 No Content responses gracefully (e.g. returning[]).fetchContributors(),fetchIssues(), andfetchPulls()should checkif (Array.isArray(data))before spreading intoall.push(...data), and break gracefully ifdatais not an array.Steps to Reproduce
explore()on an organization that has repositories with disabled issues or empty repositories.TypeError: data is not iterableand fails to complete analytics aggregation.Note
Please do not post AI-generated spam or generic template comments on this issue.
Logs and Screenshots
No response
Environment Details
No response
Impact
High - Major feature is broken
Code of Conduct