Coder Social home page Coder Social logo

chibanemourad / github-issue-counter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from morrisjobke/github-issue-counter

0.0 1.0 0.0 5 KB

A script to get the count of open/closed issues/PRs on GitHub on a per day basis.

License: MIT License

Python 100.00%

github-issue-counter's Introduction

GitHub issue count stats

This is a script that fetches all issues and PRs from GitHub for a specific repo. Then it calculates the count of open issues/PRs and their closed counterpart.

You can combine the output of this script with gnuplot and get following.

open issues

How to start

Install the requirements

    pip install github3.py

or

    pip install -r requirements.txt

Get an API key for GitHub and set it as GITHUB_TOKEN in import_issues.py.

Update the ORG and REPO constant in import_issues.py and process_issues.py.

You can also specify a list of bug labels (BUG_LABEL) that rate a ticket with 10, and critical bug labels (CRITICAL_BUG_LABEL) that rate a ticket with 100. All other tickets are rated with 1. These numbers just apply for open tickets.

Then there is a new list for all sub components of your software that contains tickets in the same bug tracker and have separate labels. Each of them will get a sub rating to compare sub components against each other. They are specified by the APP_LABEL config option.

Run fetcher part:

    ./import_issues.py

This will fetch all issues and PRs and save the needed information to a JSON file to work with in the next step, which saves GitHub API requests and speeds the overall process up.

No process this file and calculate the issue/PR count for each day:

    ./process_issues.py

This then saves the result to a file called result.tsv, which has following format(columns are separated by tabs):

    date	open_issues	closed_issues	open_prs	closed_prs
    2012-08-26	0	0	0	1
    2012-08-27	2	1	1	1
    2012-08-28	2	1	0	2

You can plot this file to a line graph via gnuplot and following commands:

    set xdata time
    set timefmt '%Y-%m-%d'
    plot 'result.tsv' using 1:2 title column with lines, 'result.tsv' using 1:3 title column with lines, 'result.tsv' using 1:4 title column with lines, 'result.tsv' using 1:5 title column with lines

For plotting the ranking graph:

    plot 'result.tsv' using 1:6 title column with lines

For plotting the ranking graph per app use this:

    plot 'result.tsv' using 1:7 title column with lines, 'result.tsv' using 1:8 title column with lines, 'result.tsv' using 1:9 title column with lines, 'result.tsv' using 1:10 title column with lines, 'result.tsv' using 1:11 title column with lines, 'result.tsv' using 1:12 title column with lines, 'result.tsv' using 1:13 title column with lines,  'result.tsv' using 1:14 title column with lines

github-issue-counter's People

Contributors

morrisjobke avatar lukasreschke avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.