Giter Club home page Giter Club logo

github_issues_report's Introduction

Generate Github Issues Report

You can run this code locally or using docker. Pick your poison:

Local Install

pyenv local 3.5.2
mkvirtualenv github_issues_report
pip install -r requirements.txt

Usage:

python report.py <GITHUB_TOKEN> <GITHUB_REPO> <GITHUB_ORG> <GITHUB_ISSUE_LABEL> >report.html

Docker Container

docker build .
docker images
docker tag <ID_OF_WHAT_YOU_JUST_BUILT> your_dockerhub_user/github_issues_report:latest
docker run davidthewatson/github_issues_report python report.py <YOUR_API_TOKEN> <YOUR_REPO> <YOUR_ORG> <YOUR_LABEL> >report.html

The result is the same regardless of whether you run locally or via docker container.

The code in this repo generates a report based on the arguments by hitting the Github API and returning an HTML table of issues like this:

<h1>Github Issue Status</h1>
<table border="1" cellpadding="10" width="1024">
  <tbody>
    <thead>
      <tr>
        <th>NUMBER</th>
        <th>TITLE</th>
        <th>ASSIGNEES</th>
        <th>PRIORITY</th>
        <th>STATUS</th>
      </tr>
    </thead>
    <tr>
      <td>
        <a href="https://github.com/davidthewatson/fizzbuzz/issues/1">1</a>
      </td>
      <td width="200">This repo is harmful to children!</td>
      <td width="200">david watson</td>
      <td width="100">2</td>
      <td><p><strong>Please add status comment!</strong></p></td>
    </tr>
  </tbody>
</table>

When it's formatted:

Github Issue Status

NUMBER TITLE ASSIGNEES PRIORITY STATUS
1 This repo is harmful to children! david watson 2

Please add status comment!

issue_reminders.py

The issue reminder tool builds off of the basic issue report. It checks the target github repository, identifies issues which should be updated and emails issue tables to those responsible. The indentification of issues that require update is based on a yaml config that defines how often issues with certain tags should be updated. The emails are sent to the public email addresses associated with the github assignees of each issue (unless overriden in the config file). The emails are sent from 'localhost' and require that an smtp server be running on the host machine.

Design

The program is designed to work in a stateless fashion to make it easier to maintain. It is designed to run once each day, at the same time of day, and sent emails if the int() of the time that has passed since the last post was made is equal to the criteria in the config. This opens it up to edge case issues, but in this first cut this has worked fine.

When starting this system, there may be some issues that are passed all the normal reminder criteria. In the future, there will probably be a way to specific repeating reminders out arbirarily timeframes. In this first cut, we have the 'catchup' flag in the config file, which will send emails for all issues that are over any criteria. Once these are addressed, you can turn it off and set it to run daily.

Example Out

An example email is below:

Please update, close or change the priority of the following issues so your team knows what is going on.

NUMBER TITLE ASSIGNEES PRIORITY STATUS
1 This repo is harmful to children! David Watson 2

Updated that was a long time able for this issue

github_issues_report's People

Contributors

davidthewatson avatar sinzor avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

github_issues_report's Issues

Add reminder to bug people to assign issues to someone

Generally start with the submitter. If there is some issue with that logic, we might fail over to a designated PM or something. Should have the ability to create exceptions for this, like for priority 2 issues. This will probably lead into the capability to bug recipients to give a priority to things.

Modify reminder tool to only send on weekdays

Part of this could be handled by whatever is calling this program. However, in non-catchup mode, logic is need to collect all the emails that would have been sent over the weekend, to go out on that Monday.

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.