The GitHub APIs provide a rich resource for exploring issue resolution patterns across open-source projects. However, for researchers and developers aiming to analyze issue lifecycles at scale, the default APIs present challenges such as rate limits, query caps, and pagination complexity.
IssuesClassifier is a modular Node.js pipeline built around the GitHub GraphQL API and OpenAI’s GPT models. It enables you to automatically retrieve, clean, classify, and analyze GitHub issues — helping you understand how well-maintained and responsive a repository is. The tool supports a full analysis pipeline from raw issue download to CSV statistical output.
Before running the scripts, make sure you have the following dependencies installed:
@octokit/graphql: To perform GitHub GraphQL queriesgraphql-request: Additional GraphQL request supportaxios: For OpenAI API integrationfs: To handle file operationsminimist: To parse command-line argumentsdotenv: To manage environment variables (API keys)csv-writer(optional): If you want to customize CSV writing
You can install all required dependencies with:
npm installThis tool depends on GitHub’s GraphQL API to fetch issues and timeline events. For detailed reference on how GraphQL queries work, see the GitHub GraphQL API Documentation.
To authenticate, you will need a GitHub personal access token with at least repo and read:org scopes.
You will also need an OpenAI API key to use GPT-based classification.
This tool is designed to be flexible: you can run the entire analysis pipeline with one command, or execute individual scripts step-by-step.
node run-all.js "author" "repository" "YYYY-MM-DD"This command will:
- Fetch all closed issues since the provided date
- Download the full timeline for each issue
- Summarize key data fields
- Classify each issue using GPT + rules
- Analyze results and export statistics
- Count external repository mentions
Each script can be executed independently as follows:
node issues.js "author/repository" "YYYY-MM-DD"Retrieves all closed issues after the specified date
Output:issues_raw.json
node fetch.js issues_raw.jsonAdds timeline data (events, comments, links)
Output:issues_full.json
node summarize.jsExtracts important fields (last comment, labels, links)
Output:issues_res.json
node classify.js issues_res.jsonClassifies each issue using OpenAI + local rules
Output:classifications.csv
node analyze.jsOutputs % per category (e.g. 43%
fixed_by_devs, 28%inactivity, etc.)
Output:classification_stats.csv
node count.js issues_res.jsonFinds mentions of other GitHub repositories in:
- Comments (e.g. links to other repos)
- Cross-referenced issues/PRs
Output:external_comments.csv,external_crossrefs.csv,summary_counts.csv
"author": The GitHub username/organization (e.g.alandtse)"repository": The repo name (e.g.alexa_media_player)"YYYY-MM-DD": Start date (e.g.2023-01-01)
The tool produces multiple structured outputs:
issues_raw.json: Closed issues metadataissues_full.json: Timeline + events per issueissues_res.json: Cleaned and summarized issue data
classifications.csv: Issue ID + classification labelclassification_stats.csv: Aggregated classification stats (%)external_comments.csv: Repos linked in issue commentsexternal_crossrefs.csv: Repos mentioned in cross-referencessummary_counts.csv: Count of PR and commit links per issue
Each issue is assigned to one of the following categories:
fixed_by_devs: Closed via PR, commit, or explicit fixinactivity: Closed for inactivity (bot or silence)duplicate: Labeled as duplicate or linked to another issueworkaround: Closed with a workaround mentioned in commentsnot_our_problem: Redirected to another repo or external causenon_issue: Author closed their own invalid issuenot_enough_info: Closed due to missing feedback/infoother: Unclear or uncommon case
You can adapt:
- Classification rules in
classify.js - Comment/link patterns in
summarize.js - Output formatting (JSON, CSV, filters)
- Dictionary or sentiment logic (future extensions)
The data allows you to answer:
- Is this project responsive to users?
- Are issues resolved quickly and directly?
- Does the community suggest workarounds or ignore reports?
- Are other repos consistently blamed or mentioned?
MIT License
Copyright (c) 2025
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Feel free to customize this project according to your goals. Contributions welcome!