{"id":17006316,"url":"https://github.com/zacheddy/issuelabeler","last_synced_at":"2025-03-22T10:51:02.697Z","repository":{"id":239628216,"uuid":"75671208","full_name":"ZachEddy/IssueLabeler","owner":"ZachEddy","description":"Automatically label issues on GitHub repositories with machine learnin' (demo available)","archived":false,"fork":false,"pushed_at":"2017-05-24T22:13:14.000Z","size":9872,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-27T10:43:33.801Z","etag":null,"topics":["classifier","machine-learning","python","scikit-learn"],"latest_commit_sha":null,"homepage":"https://issueclassifier.herokuapp.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZachEddy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-05T22:15:56.000Z","updated_at":"2019-02-11T08:19:26.000Z","dependencies_parsed_at":"2024-05-13T18:39:24.306Z","dependency_job_id":null,"html_url":"https://github.com/ZachEddy/IssueLabeler","commit_stats":null,"previous_names":["zacheddy/issuelabeler"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZachEddy%2FIssueLabeler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZachEddy%2FIssueLabeler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZachEddy%2FIssueLabeler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZachEddy%2FIssueLabeler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZachEddy","download_url":"https://codeload.github.com/ZachEddy/IssueLabeler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244945591,"owners_count":20536296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["classifier","machine-learning","python","scikit-learn"],"created_at":"2024-10-14T05:05:31.047Z","updated_at":"2025-03-22T10:51:02.678Z","avatar_url":"https://github.com/ZachEddy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Overview\nThis project attempts to automatically label issues and pull requests on GitHub repositories. It does so by identifying patterns between issue descriptions and their corresponding labels. With enough user-generated examples for training, it will create meaningful labels on its own. Less time spent labeling = more time for pizza 🍕.\n\n## Example\nThe Rails repository has thousands of labeled issues and pull requests. I collected all ~25,000 and stored them in `rails_data.json` to use for training. About two-thirds unfortunately don't have labels, which makes them useless for supervised learning. Regardless, the following will demonstrate the purpose of this project.\n\nIt might help to quickly glance at the [list of labels](https://github.com/rails/rails/labels) used in the Rails repository.\n\n```python\n\u003e\u003e\u003e import labeler\n\u003e\u003e\u003e l = labeler.Labeler()\n\u003e\u003e\u003e issue = \"\"\"Some of the rails documentation needs to be updated to match version 4.2.7.1.\n... Specifically, they don't include several new methods for model schema\"\"\"\n\u003e\u003e\u003e l.classify_issue(issue)\n[(u'activerecord', u'docs')]\n```\n\nAfter training on a few thousand examples, the classifier determines `issue` should have two labels: `activerecord` and `docs`. This makes sense considering the language of the issue. First, mentioning 'documentation' would suggest it relates to, well, documentation. Second, ModelSchema is a part of ActiveRecord, so it seems logical to label it `activerecord`.\n\nI also tested this classifier with 30 labeled issues from the Rails repository. It needs work, but [**the preliminary results are very exciting**](http://chopapp.com/#5a3xiqo0). Seriously, check it out! (the page takes a few seconds to load)\n\n## Installing\nYou will need **scikit-learn**, a machine learning package for Python. Click [here](http://scikit-learn.org/stable/install.html) to see their step-by-step installation page.\n\n    pip install -U scikit-learn\n\nClone the repository and you're set!\n\n    git clone https://github.com/ZachEddy/IssueLabeler\n\n## Configuring\nSetting this up for different repositories is a matter of modifying `configuration.py`. You will find explanations of each parameter inside [the configuration file](https://github.com/ZachEddy/IssueLabeler/blob/master/configuration.py).\n\nI will quickly mention the need for an access token. GitHub limits unauthenticated users to 60 API requests per hour. With an access token, that limit increases to 5000 per hour. As another measure of rate limiting, GitHub servers won't respond with more than 100 issues per request. You can collect 500,000 issues per hour (more than enough) versus 6000 (probably not enough) by creating an access token. Helpful instructions for generating access tokens are available [here](https://help.github.com/articles/creating-an-access-token-for-command-line-use/).\n\nOnce configured, you can collect repository issues with `repo_miner.py`:\n\n```python\n\u003e\u003e\u003e import repo_miner\n\u003e\u003e\u003e r = repo_miner.RepoMiner()\n\u003e\u003e\u003e r.load_issues()\nProgress: sending request 1\nProgress: sending request 2\nProgress: sending request 3\nProgress: sending request 4\n```\n\nIssues get stored inside the json folder as `.json` files. After the collection process completes, you can follow the example to start classifying on your own.\n\n## Concluding Remarks\nIf I make the classifier generate labels accurately, I will turn this into a GitHub application that auto-labels new issues via POST requests. At the moment, however, I am working to improving classification.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzacheddy%2Fissuelabeler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzacheddy%2Fissuelabeler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzacheddy%2Fissuelabeler/lists"}