GithubHelp home page GithubHelp logo

pagerduty / lita-pagerduty Goto Github PK

View Code? Open in Web Editor NEW
25.0 13.0 26.0 127 KB

A PagerDuty plugin for Lita

License: MIT License

Ruby 100.00%
lita pagerduty chatops team-lohika in-scope type-service

lita-pagerduty's Introduction

lita-pagerduty

Build Status MIT License RubyGems :: RMuh Gem Version Coveralls Coverage Code Climate Gemnasium

A PagerDuty plugin for Lita.

Installation

Add lita-pagerduty to your Lita instance's Gemfile:

gem "lita-pagerduty"

Configuration

Create a PagerDuty API key (v2). You will need to give it FullAccess to update incidents.

Add the following variables to your Lita config file:

config.handlers.pagerduty.api_key = ''
config.handlers.pagerduty.email   = ''

If your account has the teams capability and you want to scope Lita's access to a specific set of teams, you can set the list of teams by adding the following to your config file:

config..handlers.pagerduty.teams = [ "team-a", "team-b" ]

Usage

Misc

pager identify <email address>     - Associate your chat user with your email address
pager forget                       - Remove your chat user / email association

Specific incidents

pager incidents all                - Show all open incidents
pager incidents mine               - Show all open incidents assigned to me
pager incident <incident ID>       - Show a specific incident

Incident notes

pager notes <incident ID>          - Show all notes for a specific incident

Acknowledging an incident

pager ack all                      - Acknowledge all triggered incidents
pager ack mine                     - Acknowledge all triggered incidents assigned to me
pager ack <incident ID>            - Acknowledge a specific incident

Resolving an incident

pager resolve all                  - Resolve all triggered incidents
pager resolve mine                 - Resolve all triggered incidents assigned to me
pager resolve <incident ID>        - Resolve a specific incident

Schedules

pager oncall - List available schedules
pager oncall <schedule> - Show who is on call for the given schedule

License

MIT

lita-pagerduty's People

Contributors

acrewdson avatar arupchak avatar biggless avatar davidcornu avatar esigler avatar eugeneosadchyi avatar johntdyer avatar kendrickm avatar kovyrin avatar nilium avatar saurabh-hirani avatar scarytom avatar t33chong avatar whiteley avatar

Stargazers

 avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lita-pagerduty's Issues

Dependency on pagerduty-sdk causes bundler to fail

Hi Eric,

I know this isn't your issue per se. But I was hoping you might know more about it.

I recently started using Lita and lita-pagerduty specifically. I wrote a Chef cookbook for it and had to do a workaround because of the pagerduty-sdk rubygem has a dependency on "active_support" instead of "activesupport":

https://github.com/litaio/chef-lita#todo

The pagerduty-sdk rubygem was patched in Github in February but not yet released:

kryptek/pagerduty-sdk#2
http://rubygems.org/gems/pagerduty-sdk/versions/1.0.5

Is that gem the official rubygem of PagerDuty? (I don't think is nor do I think one exists, but just checking.)

If not, do you happen to know the maintainer of rubygem-sdk and could coax him into releasing a new gem?

If not, would you entertain a PR switching lita-pagerduty to another PagerDuty rubygem that seems like it it's more actively developed? (This perhaps? http://rubygems.org/gems/pagerduty)

Thanks for developing lita-pagerduty!

Harlan

Support for proxy

When using this plugin we need to send requests through a squid proxy. Is it possible to add support?

JSON parsing error

When running any query, I'm getting a JSON parse issue:

[2017-02-05 12:01:14 UTC] ERROR: Lita::Handlers::PagerdutyUtility crashed. The exception was:
743: unexpected token at ''
Full backtrace:
/vendor/bundle/ruby/2.3.0/gems/json-2.0.3/lib/json/common.rb:156:in `parse'
/vendor/bundle/ruby/2.3.0/gems/json-2.0.3/lib/json/common.rb:156:in `parse'
/vendor/bundle/ruby/2.3.0/gems/pagerduty-sdk-1.0.9/lib/pagerduty/core.rb:79:in `curl'
/vendor/bundle/ruby/2.3.0/gems/pagerduty-sdk-1.0.9/lib/pagerduty/pagerduty.rb:883:in `get_schedules'
/vendor/bundle/ruby/2.3.0/bundler/gems/lita-pagerduty-cb796fa02423/lib/lita/handlers/pagerduty_utility.rb:62:in `on_call_list'
/vendor/bundle/ruby/2.3.0/gems/lita-4.7.1/lib/lita/callback.rb:31:in `public_send'
/vendor/bundle/ruby/2.3.0/gems/lita-4.7.1/lib/lita/callback.rb:31:in `call'
/vendor/bundle/ruby/2.3.0/gems/lita-4.7.1/lib/lita/handler/chat_router.rb:97:in `dispatch_to_route'
/vendor/bundle/ruby/2.3.0/gems/lita-4.7.1/lib/lita/handler/chat_router.rb:82:in `block in dispatch'
/vendor/bundle/ruby/2.3.0/gems/lita-4.7.1/lib/lita/handler/chat_router.rb:72:in `map'
/vendor/bundle/ruby/2.3.0/gems/lita-4.7.1/lib/lita/handler/chat_router.rb:72:in `dispatch'
/vendor/bundle/ruby/2.3.0/gems/lita-4.7.1/lib/lita/robot.rb:69:in `block in receive'
/usr/local/lib/ruby/2.3.0/set.rb:306:in `each_key'
/usr/local/lib/ruby/2.3.0/set.rb:306:in `each'
/vendor/bundle/ruby/2.3.0/gems/lita-4.7.1/lib/lita/robot.rb:66:in `map'
/vendor/bundle/ruby/2.3.0/gems/lita-4.7.1/lib/lita/robot.rb:66:in `receive'
/vendor/bundle/ruby/2.3.0/bundler/gems/lita-slack-7af55c22aed7/lib/lita/adapters/slack/message_handler.rb:123:in `dispatch_message'
/vendor/bundle/ruby/2.3.0/bundler/gems/lita-slack-7af55c22aed7/lib/lita/adapters/slack/message_handler.rb:160:in `handle_message'
/vendor/bundle/ruby/2.3.0/bundler/gems/lita-slack-7af55c22aed7/lib/lita/adapters/slack/message_handler.rb:18:in `handle'
/vendor/bundle/ruby/2.3.0/bundler/gems/lita-slack-7af55c22aed7/lib/lita/adapters/slack/rtm_connection.rb:100:in `block in receive_message'
/vendor/bundle/ruby/2.3.0/bundler/gems/lita-slack-7af55c22aed7/lib/lita/adapters/slack/event_loop.rb:10:in `block in defer'
/vendor/bundle/ruby/2.3.0/gems/eventmachine-1.2.2/lib/eventmachine.rb:1076:in `block in spawn_threadpool'

I'm using a v1 legacy key

Add note to incident

I have created a PR in the PagerDuty sdk for adding a note to the incident. Just not sure how to wire it into the notes in this plugin. Would it be easy to get this wired up?

Add note to incident PR:
kryptek/pagerduty-sdk#11

Broken - pager identify

Hi,

Great plugin. But I'm unable to use the pager identify <emailaddress> functionality (there's no response in Slack, and nothing in the logs). From my debugging, it looks like the route isn't matching (simply added toasts inside the def identify(response) function, and watched logs).

I checked on http://rubular.com if your EMAIL_PATTERN regex would match what I'm specifying and it does, so it's not anything to do with that.

Do you have any thoughts on why this is happening?

Should be able to take the pager

It'd be awesome if people could take the pager by being in Slack.
Obviously I'd expect this functionality to only work for people who have associated their PD email to their Lita username/handle.

lita: pager me 5m
Would give me the pager for 5 minutes by adding an override.

For reference, the commonly used PagerDuty Hubot plugin has this functionality.

Implementing "who's on call?"

Hi PD friends,

I'm going to take a stab at implementing the "who's on call?" route as that has become a priority for me/us at my current employer.

If this is bad or there's some hangup I haven't found yet (since I randomly just decided to give this a go) please let me know and I'll back off.

Thanks,

Harlan

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.