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

hubot-github-pr-reporter

v1.1.5

Published

Show open PRs for a user, team or organization. Schedule hubot to reguarly report on open PRs.

Downloads

39

Readme

hubot-github-pr-reporter

Show open PRs for a user, team or organization. Schedule hubot to reguarly report on open PRs.

See src/github-pr-reporter.coffee for full documentation.

Installation

In hubot project repo, run:

npm install hubot-github-pr-reporter --save

Then add hubot-github-pr-reporter to your external-scripts.json:

[
  "hubot-github-pr-reporter"
]

Dependencies

Environment Variables

  • HUBOT_GITHUB_TOKEN - used by githubot
  • HUBOT_GITHUB_USER - used by githubot

Dependencies:

  • "cron-parser": "1.0.1" - Used to parse cron string input
  • "githubot": "1,0,0" - Used to query GitHub
  • "moment": "2.10.6" - Used for report formatting
  • "node-schedule": "0.5.1" - Used for the scheduling feature
  • "underscore": "1.8.3" - Used for report formatting
  • "github-credentials" - Optional. Translates github names to @mention names.

Sample Interaction

Show a list of open pull requests

gary> hubot show prs
hubot>
@gary:
  8 hours, 0 comments, @dala, Improve reporting
  ↳ https://github.com/example/reporting/pull/42
  3 hours, 2 comments, *unassigned*, Updated readme
  ↳ https://github.com/example/reporting/pull/24
mr_house:
  *6 months*, 0 comments, benny, Updates to platinum chip
  ↳ https://github.com/example/chip/pull/101

You can specify:

  • No options. Just hubot show prs to get the fire hose.
  • A user to show PRs by that author, by adding a user:githubLogin string. If you're using github-credentials, you can also specify the user by the chat room name (like user:@chatName), and hubot will automatically translate it to their github name.
  • A team to show PRs authored by that team, by adding a team:teamName string. You can go to https://github.com/orgs/{{ORGANIZATION_NAME}}/teams to see a list of available team names for a given organization.
  • An organization to show all open PRs in that org, by adding a org:organizationName string. To see a list of available organizations, go to the profile of HUBOT_GITHUB_USER and look at the Organizations section on the left hand side.

Note that the order matters, and they chain when possible. For instance:

  • Specifying user and org limit the responses to just that user in that org. Useful if a user has open PRs in multiple orgs, but you only care about one.
  • Specifying a team and an org helps specify which team you mean, since team names aren't globally unique.

Subscribe to PR reports

gary> hubot subscribe prs for user:mr_house
hubot> @gary: Great! This request will show you all PRs mentioning mr_house at the default frequency (weekdays at noon)

... then, at noon ...
hubot>
mr_house:
  *6 months*, 0 comments, benny, Updates to platinum chip
  ↳ https://github.com/example/chip/pull/101

To unsubscribe, type `hubot unsubscribe prs 5`

You can specify:

  • The same options for name, team, and org above. Same rules apply.
  • A custom frequency by specifying the cron format you want hubot to report at. You can do this by adding cron:"your cron string" to the command.

Show a list of all ongoing subscriptions

gary> hubot show pr subscriptions
hubot>
ID   Requestor    Description
5    gary         paused => org:example

This will show all of the subscriptions for the room you're currently in. To see all subscriptions hubot is keeping track of, add 'all' to the request:

gary> hubot show all pr subscriptions
hubot>
Room           ID   Requestor    Description
engineering    5    gary         org:example
research       7    mr_house     paused => team:securitron org:example

A "paused" mention in the description just means hubot lost a reference to the room, and can't post to it until someone says something. As soon as there's other activity in the room, it'll automatically resume the subscription.

Unsubscribe from a report

gary> hubot unsubscribe pr 5
hubot> Successfully unsubscribed from 5: all PRs in the example organization at the default frequency (weekdays at noon)

Note that you need to be in the room that requested the subscription in order to unsubscribe. That's so folks in that room know that the subscription was stopped, rather than something broke.