Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jimver/github-comment-counter
GitHub comment counter for Pull requests / Issues filtered by labels
https://github.com/jimver/github-comment-counter
comment counter github issues pull-requests
Last synced: 21 days ago
JSON representation
GitHub comment counter for Pull requests / Issues filtered by labels
- Host: GitHub
- URL: https://github.com/jimver/github-comment-counter
- Owner: Jimver
- License: mit
- Created: 2020-03-30T15:09:59.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-31T10:39:50.000Z (almost 5 years ago)
- Last Synced: 2024-10-26T07:23:49.970Z (2 months ago)
- Topics: comment, counter, github, issues, pull-requests
- Language: Python
- Homepage:
- Size: 92.8 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub comment counter
This repo contains a small script that counts the comments on a repository on GitHub.
It can count the amount of comments in issues, PRs or both combined. It also has the ability
to filter the issues/PRs based on a label. Multiple labels can be given to give an overview of
comment counts across different labels.## Usage
First clone or download this repository locally.
Go to the root of the repository and install required packages using `pip`:
`pip install -r requirements.txt`
Then run the program by invoking it using:
`github-comment-counter.py [OPTIONS]`
The [OPTIONS] contain the CLI arguments:
- `--repo_name REPO_NAME` The repository name, for example `numpy`.
- `--repo_owner` The owner of the repository, in the case of NumPy this is also `numpy`.
- `--label` The label of the issues / PRs to filter on. To analyse multiple labels you can put more of them after each other. (See example below)
- `--issues/--no-issues` flag that controls whether to take issues into account.
- `--pull_requests/--no-pull_requests` flag that controls whether to take PRs into account.
- `--help` for instructions.Note that you should put strings with spaces between double quotes (") for proper argument parsing.
Example command:
```
github-comment-counter.py --repo_name numpy --repo_owner numpy -label "component: numpy.core" -label "component: numpy.fft" -issues -pull_requests
```Example output in csv (first 6 rows):
```csv
username,component: numpy.core,component: numpy.fft
seberg,222,23
mattip,148,14
charris,121,118
eric-wieser,114,10
rgommers,50,38
mhvk,49,14
```
And a more readable version in markdown for this README.| username | component: numpy.core | component: numpy.fft |
|-------------|-----------------------|----------------------|
| seberg | 222 | 23 |
| mattip | 148 | 14 |
| charris | 121 | 118 |
| eric-wieser | 114 | 10 |
| rgommers | 50 | 38 |
| mhvk | 49 | 14 |