Git Product home page Git Product logo

pr-triage's Introduction

pr-triage

GitHub Pull Request Triage Assistant

About

This application provides reports of various GitHub pull requests, so it's easy to identify pull requests that correspond to certain parts of an application, or that are submitted by certain authors. It can also be used to identify pull requests with merge conflicts that need revisions, so that authors can go back and resolve those conflicts.

In short, it simplifies running large, very active projects that use pull requests for contribution.

A demo is available at http://ansible.sivel.net

Installing

  1. git clone https://github.com/sivel/pr-triage.git
  2. cd pr-triage
  3. pip install -r requirements.txt
  4. Create a triage.yaml configuration file as described below

triage.yaml

This file can live at ./triage.yaml, ~/.triage.yaml, or /etc/triage.yaml

---
# Required Configuration
title: My PR Triage
github_client_id: 1ecad3b34f7b437db6d0
github_client_secret: 6689ba85bb024d1b97370c45f1316a16d08bba20
github_repository:
  - 'ansible/ansible'

# Optional Configuration
use_rackspace: true
pyrax_credentials: ~/.rackspace_cloud_credentials
pyrax_region: DFW
pyrax_container: ansible-pr-triage

The above values are dummy placeholder values and are not valid for use

GitHub credentials

You will need to register an application to provide API access. The Client ID and Secret will need to be populated as shown in the above example.

Hosting

There are currently 2 options for hosting the HTML files generated by this application.

  1. Local
  2. Rackspace CloudFiles

Local

triage.py will write out HTML files to a directory called htmlout. You can host these files directly out of that directory using a webserver such as Apache or nginx.

Rackspace CloudFiles

It is not required that you upload the files to Rackspace CloudFiles, this is just here for convenience. The CloudFiles container that you wish to upload to should already exist and be configured to host a static website. See Point And Click Your Way To A Cloud Files Static Website With The Control Panel for details on how to configure this.

If you intend on using Rackspace CloudFiles to host the files, you will also need the pyrax python module installed. Additionally, you will also need a valid pyrax credentials file.

Installing pyrax

pip install pyrax

Running

It is recommended that you run triage.py via cron. The fewer pull requests a project has the more frequently you can run the cron job. I'd recommend starting with every 60 minutes (1 hour).

pr-triage's People

Contributors

mpdehaan avatar omgjlk avatar sivel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pr-triage's Issues

Support multiple repos

Just so this is visible, there is work happening in the 'multi-repo' branch to add this functionality.

The config file may likely have some required changes.

This is currently in use on http://ansible.sivel.net

Make file destination configurable

Currently the HTML output location is hardcoded to htmlout in the directory where triage.py exists. This could be improved with another configuration option.

Identifying merge conflicts is unreliable

I haven't looked into it in much depth, but the mergeable and mergeable_status attributes seem unreliable. One run may identify 100 PRs with merge conflicts, the next could return 4.

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.