Giter VIP home page Giter VIP logo

prs-ruby's Introduction

Ruby scripts to interact with the github API

These scripts require a personal access token stored in the environment variable GITHUB_ACCESS_TOKEN The following scopes are required:

  • repo

  • read:org

  • generate one through the Github website

  • export GITHUB_ACCESS_TOKEN=...

  • optionally set GITHUB_TEAM to avoid having to pass it as a param to the scripts export GITHUB_TEAM=org/team


View a Pull Request

./pr.rb <github pull request url>

This will output the title, branch, author, created time and reviews and review requests.

Screenshot


View my open Pull Requests

./my_prs.rb

This will output all open PRs for the user that owns the GITHUB_ACCESS_TOKEN.


View open Pull Requests for all members of a github team

./team_prs.rb <org/team>

# or
export GITHUB_TEAM=<org/team>
./team_prs.rb

This will output all open PRs for members of the team, for repos that are in the org


View all Pull Requests involving any members of a github team

./team_unified_prs.rb <org/team> <team members to skip> <pr ids to skip> <team repos to include>

# or
export GITHUB_TEAM=<org/team>
./team_unified_prs.rb

This will output all PRs opened by, commented on, requested reviews on, etc for any members of the team on any repos that are in the org, or for any PRs that are opened by anyone on repos that are listed as "owned" by the team.

Additionally you can skip team member PRs using the 2nd arg or env var GITHUB_SKIP_TEAM_MEMBERS or skip specific PRs using the 3rd arg or env var GITHUB_SKIP_PR_IDS and you can list the team repos to include with the 4th arg or env var GITHUB_TEAM_REPOS, both are comma separated lists.


Request reviews from individual members of a github team

./request_review.rb <github pull request url> <team name>

# or
export GITHUB_TEAM=<org/team>
./request_review.rb <github pull request url>

This will request a review from each member of a github team, so that the first review response does not remove the request from the other members.

prs-ruby's People

Watchers

 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.