New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

hubot-github-adapter

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hubot-github-adapter

Hipchat adapter for Github. Talk to your Hubot from issue and pull request comments.

latest
Source
npmnpm
Version
0.10.0
Version published
Maintainers
1
Created
Source

hubot-github-adapter

A Hubot adapter to use with Github.

Use this adapter to have Hubot listen and comment on Github issues and pull requests.

Motivation

We use pull requests a lot. Now that we have a Hubot listening to our Pull Request chatter, we can do things like:

  • Ask hubot to merge our target branch back into our feature branch
  • Ask hubot to rebuild our branch (if it failed for a transient reason)
  • Get a picture of a cool squirrel when we say "ship it"

So, basically all the cool stuff that Hubot already does, but in the context of Github comments.

Getting Started

Creating a new bot

Follow the Hubot instructions to create a new bot.

####Install this adapter:

  • cd /path/to/hubot
  • yo hubot
  • npm install hubot-github-adapter --save
  • Initialize git and make your initial commit

####Create a Github User for your bot:

This is the user your Hubot will use to post comments.

  • repo (If you want it to create comments on private repos it has access to)
  • public_repo (so that it can create comments on public repos)

(Keep this token as secret as you would a password.)

####Create a Github Webhook for your each of your repositories: You'll need to create a Github webhook for every repository you want Hubot to listen to.

####Configure your Hubot

Set the HUBOT_GITHUB_TOKEN environment variable to the token you created above.

Let's say you gave your Hubot user the name "BestHubotEver" You'll want to start your hubot with that name:

  • HUBOT_GITHUB_TOKEN=some-long-guid-number ./bin/hubot --adapter github-adapter --name BestHubotEver

####Test Your Hubot

Hubot is now listening to your comments on issues and pull requests. You should be able to say: @BestHubotEver ping, and if he is listening, he will respond with PONG

Testing your bot locally

If you want to test your bot locally, you can create a temporary webhook that goes to your machine instead of a live Hubot. See detailed instructions on the hubot-github-webhook-listener page.

Configuration

This adapter uses the following environment variables:

  • HUBOT_GITHUB_TOKEN - This is the auth token for the Github user you created above.

A note on naming

It's customary to name adapters simply hubot-<adapter>, however github-hubot is taken.

Copyright © YouNeedABudget.com, LLC. (Github: YNAB)

Author

Taylor Brown, aka Taytay

License

MIT License; see LICENSE for further details.

Keywords

hubot

FAQs

Package last updated on 18 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts