lita-stackstorm is an handler for Lita that allows your bot to interact with your stackstorm installation via st2api.
Installation
Add lita-stackstorm to your Lita instance's Gemfile:
gem "lita-stackstorm"Configuration
Required
-
url(String) – The location of the running st2api service. -
username(String) – The username used to authenticate with st2api. -
password(String) – The password used to authenticate with st2api.
Optional
-
auth_port(Integer) – Port used for Authentication. Defaults to9101. -
execution_port(Integer) – Port for executions. Defaults to9100. -
emoji_icon(String) – Emoji used when bot injests event stream. Defaults to:panda:.
Example
Lita.configure do |config|
config.handlers.stackstorm.url = "https://st2.example.com"
config.handlers.stackstorm.username = ENV["ST2_USERNAME"]
config.handlers.stackstorm.password = ENV["ST2_PASSWORD"]
endUsage
st2 list - lists all chatops aliases from registered packs.
Executing Actions
Action Aliases require the ! prefix. For example, in order to run the packs.info action when investigating the linux pack, you'll run:
!pack info linuxThis handler also provide support for partial commands. For example, suppose you type:
!pack deployThe handler will return the closest likely matches:
possible matches:
pack deploy {{pack}}
pack deploy {{pack}} from {{repo}}