Skip to main content

Get Total Open Issue Analysis

About

  • The getTotalOpenIssueAnalysis function is a server-side endpoint responsible for analyzing and providing the total count of open issues across all repositories associated with a specific user. The process begins by extracting the user ID from the incoming request, retrieving user information from the database, and fetching details about the user's repositories. The function then iterates through each repository, summing up the counts of open issues. The result is a JSON object containing the total count of open issues. In case the user is not found, the function throws a custom error class, UserNotFoundError, and responds with an appropriate status code and error details in JSON format. If any other errors occur during the process, the function logs the error for debugging purposes and returns the error.

Flow

Endpoint

Routes/Analysis/profileAnalysis.router.js
ProfileAnalysisRouter.get(
"/user/profileAnalysis/totalOpenIssuesCounts",
getTotalOpenIssueAnalysis
);