Coder Social home page Coder Social logo

pr-summary's Introduction

PR-Summary

A python utility to retrieve a summary of all opened, closed, and in progress pull requests for a given Github repository within some time frame, with optional email output.

Prerequisite

  1. Python with version 3.8 or above should be installed in machine.
  2. Install python request module used for making API calls using below commad.

"pip install requests"

Script Usage

Execution of script will start with main.py.

python main.py --org PyGithub --repo PyGithub --email [email protected]

In order to have the output sent as an email, you must create a credentials.json file in the same directory as main.py. This file should look something like this:

{
    "smtp_host": "smtp.gmail.com",
    "smtp_port": 465,
    "username": "[email protected]",
    "password": "SoAndSoSPasSWord"
}

If the intended solution is to use gmail, you'll have to make an app specific password and use that password in the credential.json file. In addition, the --email parameter must be provided to the script.

Argument Reference

  • --org, a required, case-sensitive string argument that indicates which public github organization the repository lives in.
  • --repo, a required, case-sensitive string argument that indicates which public github repository to look at.
  • --timeframe, The number of days to look back in time. (the default is 7)
  • --email, The email you want to send the results of the script run to. (If not provided, output will be to console.)

Example Script Output

When I ran the script using below command on Feb 3rd, 2022.This was the console output I received.

python main.py --org PyGithub --repo PyGithub --timeframe 20

Script Output:
FROM: [email protected]
TO: [email protected]
SUBJECT: Pull Request report for PyGithub/PyGithub for the 20 days preceding 2022-03-02
BODY:
Greetings!

**Pull Requests Opened:**
PR #2190 - Get all secrets from org by gerardsegarra - Link: https://github.com/PyGithub/PyGithub/pull/2190
PR #2189 - Initial commit by POCO by manju-prasad - Link: https://github.com/PyGithub/PyGithub/pull/2189
PR #2183 - feat: no update git refs method  by mittal-umang - Link: https://github.com/PyGithub/PyGithub/pull/2183
PR #2172 - Fix get events not returning user events by ncareau - Link: https://github.com/PyGithub/PyGithub/pull/2172
**Pull Requests In Progress:**
PR #2090 - Create repo from template by simkimsia - Link: https://github.com/PyGithub/PyGithub/pull/2090
**Pull Requests Closed:**
PR #2188 - Initial commit by POCO by manju-prasad - Link: https://github.com/PyGithub/PyGithub/pull/2188
PR #2187 - Initial commit by POCO by manju-prasad - Link: https://github.com/PyGithub/PyGithub/pull/2187
PR #2186 - Initial commit by POCO by manju-prasad - Link: https://github.com/PyGithub/PyGithub/pull/2186
PR #2185 - Initial commit by POCO Orig by manju-prasad - Link: https://github.com/PyGithub/PyGithub/pull/2185
PR #2184 - Use 'requests' instead of 'httplib' by manju-prasad - Link: https://github.com/PyGithub/PyGithub/pull/2184

pr-summary's People

Contributors

anusngh1986 avatar

Watchers

James Cloos avatar  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.