npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pull-report

v0.4.1

Published

Report on open GitHub pull requests for organizations and users

Downloads

7

Readme

Travis Status

Pull Request / Issue Reporter

Create reports for open GitHub pull requests / issues for organizations and users.

Installation

You can install with NPM:

$ npm install -g pull-report

Usage

pull-report can retrieve all open pull requests / issues for 1+ GitHub organizations and optionally filter by a user list.

$ pull-report --help

  Usage: pull-report [options]


  Options:

    -V, --version         output the version number
    -o, --org [orgs]      Comma-separated list of 1+ organizations
    -u, --user [users]    Comma-separated list of 0+ users
    -H, --host <name>     GitHub Enterprise API host URL
    -s, --state <state>   State of issues (default: open)
    -i, --insecure        Allow unauthorized TLS (for proxies)
    -t, --tmpl <path>     Handlebars template path
    --html                Display report as HTML
    --gh-user <username>  GitHub user name
    --gh-pass <password>  GitHub pass
    --gh-token <token>    GitHub token
    --pr-url              Add pull request or issue URL to output
    --repo-type <type>    Repo type (default: all|member|public)
    --issue-type [types]  Comma-separated list of issue types (default: pull-request|issue)
    -h, --help            output usage information

Requirements

org: You must enter 1+ organization names.

Authentication

pull-report reads your "~/.gitconfig" file looking for an entry like:

[github]
  user = MY_USERNAME
  password = MY_PASSWORD
  token = MY_TOKEN

You can alternately specify / override values on the command line:

$ pull-report \
  --org FormidableLabs \
  --gh-user MY_USERNAME \
  --gh-pass MY_PASSWORD

$ pull-report \
  --org FormidableLabs \
  --gh-token MY_TOKEN

If you user two factor auth (or do not want to specify a password on the command line or in your config file, you may instead specify a personal access token. You should generate a token from your github user account with NO additional privileges and either include it in your .gitconfig file or specify it on the command line.

The order of authentication preferences are:

  1. --gh-token
  2. --gh-user/--gh-pass w/ .gitconfig:github:user/.gitconfig:github:password
  3. .gitconfig:github:token
  4. .gitconfig:github:user, .gitconfig:github:password

GitHub Enterprise

Pull report has experimental support for GitHub Enterprise repositories. However, there are a few things to note:

  • Brittle Implementation: We hack up the host and route paths internally in the underlying node-github library. The underlying library could change how its internals work and our hack would be broken.
  • Disables TLS Cert Matching: Pull report has an --insecure option to disable the NODE_TLS_REJECT_UNAUTHORIZED environment variable to avoid an UNABLE_TO_VERIFY_LEAF_SIGNATURE error when hitting GitHub enterprise through a VPN or proxy. Do not use the flag if you can't otherwise verify you are going through a safe transport mechanism (i.e., in other programs that do verify).

To retrieve reports from GitHub Enterprise, set the --host flag to the host name of your GitHub Enterprise host.

Examples

Get all of the open pull requests for one organization:

$ pull-report --org FormidableLabs
* FormidableLabs:
  * work-for-us: (1)
    * joe-user / jane-user - 1: Added GUI to job posting API

  * chai-jq: (1)
    * jane-user / joe-user - 8: fix DOC anchor links

Get all of the open issues for one organization:

# Just the issues
$ pull-report --issue-type issue --org FormidableLabs

# Issues and PRs
$ pull-report --issue-type issue,pull-request --org FormidableLabs

Get open pull requests for multiple organizations:

$ pull-report --org FormidableLabs,ORG2

Get PRs for multiple orgs, filtered to a user list:

$ pull-report \
  --org FormidableLabs,ORG2 \
  --user ryan-roemer,USER2,USER3,USER4,USER5

Get PRs for a GitHub enterprise organization:

$ pull-report \
  --host custom-gh-enterprise.example.com \
  --org ORG1

Templates

Pull report uses Handlebars.js templates for rendering reports. The built-in templates available are:

  • text.hbs: Default pure text template. Used if no other option or templates specified.
  • html.hbs: HTML output templates. Used if the --html option is provided. The provided HTML template has some preliminary classes for user styling (in another HTML document) and a few random Pure CSS classes that are currently being used in another project. (We'll look to shore this up in future releases.)

Custom templates can be specified using the command option: --tmpl /PATH/TO/TEMPLATE.hbs.

Limitations

There is a bit of inefficiency in the current underlying use of the GitHub API. But, any issues should be relatively easy to fix and enhance.

  • pull-report retrieves at most 100 pull requests/issues for any repo.