GithubHelp home page GithubHelp logo

repostats's Introduction

GitHub repo data

Pull issue and pull request data from GitHub using the GitHub API, and decorate it with response time data.

Setup

Create a Personal Access Token in GitHub. GitHub rate-limits API calls to about 50 calls of pages containing 100 items. Authorizing with a token allows a greater query rate.

export GITHUB_TOKEN=<value of personal access token>

Install dependencies

pip install -r requirements.txt

Pull the data from GitHub

Issues

python get_issues.py [--org <github org or account>] --repo [<repository name>] [--start_page <n>] [--end_page <m>]

Gets all issues from the s[ecified] repo. Stores the output in data/{org}-{repo}-issues-{page}.json

Events

python get_issues_events.py

For all of the issues fetched in the previous step, get all of the events (add label, assign, close etc) associated with each issue. Stores the output in data/{org}-{repo}-event-{id}.json.

Comments

python get_issues_comments.py

For all of the issues fetched in the first step, get all of the comments associated with each issue. Stores the output in data/{org}-{repo}-comment-{id}.json.

Export and decorate

SLA data for Issues

python extract_sla_data.py

Exports data/sla.csv, which contains first update, first comment, time to update, time to comment, time to close for each issue.

Usage of sla.csv file

The sla.csv file provides a great way to discover trends in your project's responsiveness to issues. Here are some suggested ways to use the data for deeper insights, including the processing steps to get there:

Note: Convert the csv file to an .xlsx file to save the formulas. This data may also be graphed for visual analysis.

Excel formulas

Created Timestamp: =DATEVALUE(LEFT(D2,10))+TIMEVALUE(MID(D2,12,8))

Excel Date: =DATE(YEAR(T2),MONTH(T2),DAY(T2))

Excel Month: =YEAR(U2)&"-"&TEXT(MONTH(U2),"00")

Unique ID: =YEAR(U2)&"-"&TEXT(MONTH(U2),"00") -> Remove duplicates

Average Time To Close Issues: =AVERAGEIFS(K2:K1000, V2:V1000, "="&W2, K2:K1000, ">0")

Average Time to Comment on Issues: =AVERAGEIFS(J2:J1000, V2:V1000, "="&W2, J2:J1000, ">0")

Uncommented Issues: =COUNTBLANK(J2:JXXX)

Unclosed: =COUNTBLANK(K2:KXXX)

repostats's People

Contributors

natke avatar sophies927 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.