Code Monkey home page Code Monkey logo

pypulls's Introduction

GitHub Pull Request Extractor

The script pulls.py gets pull request data from the GitHub API and saves it to a local JSON file. The JSON file maps pull request numbers to the files in the repo that the pull request edited.

Requirements

Scopes

Instructions

Checkout this repo, cd to its root, then run the following terminal commands:

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Usage of the script is as follows:

python pulls.py <token> <repo_name> [--months <months>]
  • <token> is your GitHub personal access token.
  • <repo_name> is the full name of the repo you would like to extract e.g. kiteco/pypulls.
  • You can optionally specifiy a number of <months> to extract data for. By default, this script will extract the previous 12 months.

Data

This script extracts PR's and the files that were changed in the PR's and saves it in a JSON object:

{
  "1": [
    "file/changed/in/pr/1"
  ],
  "2": [
    "file/changed/in/pr/2",
    "another/file/changed/in/pr/2",
  ]
}

On macOS and Linux, this data is stored at ~/.kite/github/repo/name/pulls.json. On Windows it is stored at %USERPROFILE\AppData\Local\Kite\github\repo\name\pulls.json.

pypulls's People

Contributors

itsdhung 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.