SlideShare a Scribd company logo
1 of 11
Hubot
And You!
Did You Know?
Hubot is a robot
Its pronounced Hew-bot
Hubot is here to help you automate all the menial things
If you know Javascript/CoffeeScript syntax, you can write Hubot logic!
Hubot uses Redis as its “Brain” so you can persist data
Influence Health is using Hubot already!
How do I run Hubot
Hubot requires Node.JS. (It's what all the cool kids are doing)
$ brew install nodejs (Or download at https://nodejs.org/en/)
$ npm install -g yo generator-hubot
$ mkdir myhubot
$ cd myhubot
$ yo hubot
Hubot can Listen
robot.hear /badger/i, (res) ->
res.send "Badgers? BADGERS? WE DON'T NEED NO STINKIN BADGERS"
Hubot is listening, and then taking an action in response to that event
Hubot can Reply
robot.respond /open the pod bay doors/i, (res) ->
res.reply "I'm afraid I can't let you do that."
Hubot can reply to the author of a message. Hubot will only reply when @
mentioned
PR Assignment Example
Use case: When we open a PR we want all developers to share in the reviewing
of those pull requests.
1)Establish a pool of reviewers
2)Map Slack/Github usernames
3)Remember who went last, and assign to the next reviewer
Slack has a Github integration that will announce new PRs in a channel. Hubot
can be invited to this channel and listen for messages.
<Show example assign.coffee>
Testing Hubot
To run a Hubot REPL:
$ ./bin/hubot
Create a test Slack room (or join #hubot-test)
Invite Hubot from within the Slack channel (/invite @hubot)
Create a web hook at https://api.slack.com/incoming-webhooks
$ curl -X POST -H 'Content-type: application/json' --data '{"text":"foo"}'
https://hooks.slack.com/services/<hook>
Testing Hubot Continued
HUBOT_SLACK_TOKEN=xxxx ./bin/hubot --adapter slack
The Slack token is obtained when you create your web hook
Gotchas on Listening
Hubot can hear in two ways:
1)Other users (e.g. humans like you and me)
2)Other integrations (e.g. robots like the Github integration)
You must define which listening event you want to listen for:
robot.hear vs robot.listeners.push
Gotchas Continued
A message source might be different than the rendering:
This is formatted, and the source looks like this:
Pull request submitted: <hyperlink info…> by jeremydefibaugh
Pay attention when matching, and use console.log
Contributing
If you think of a useful Hubot feature, then please hack away. The hubot source
code for IH can be found at https://github.com/BrightWhistle/hubot
Or you have a feature request, or issue, report it on the repo, and someone else
can pick it up!

More Related Content

What's hot

&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
 
Zsh & fish: better *bash* for hackers
Zsh & fish: better *bash* for hackersZsh & fish: better *bash* for hackers
Zsh & fish: better *bash* for hackersRuslan Sharipov
 
Puppet without Root - PuppetConf 2013
Puppet without Root - PuppetConf 2013Puppet without Root - PuppetConf 2013
Puppet without Root - PuppetConf 2013Puppet
 
Tame your Infrastructure with Puppet
Tame your Infrastructure with PuppetTame your Infrastructure with Puppet
Tame your Infrastructure with Puppetdelimiter
 
Zsh shell-for-humans
Zsh shell-for-humansZsh shell-for-humans
Zsh shell-for-humansJuan De Bravo
 
puppet @techlifecookpad
puppet @techlifecookpadpuppet @techlifecookpad
puppet @techlifecookpadNaoya Nakazawa
 
Top 28 programming language with hello world for artificial intelligence
Top 28 programming language with  hello world for artificial intelligenceTop 28 programming language with  hello world for artificial intelligence
Top 28 programming language with hello world for artificial intelligenceAL- AMIN
 
Pimp my dev box (Friday Training at Itnig)
Pimp my dev box (Friday Training at Itnig)Pimp my dev box (Friday Training at Itnig)
Pimp my dev box (Friday Training at Itnig)itnig
 
NUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialNUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialGagah Arifianto
 
Complementing Docker with Puppet
Complementing Docker with PuppetComplementing Docker with Puppet
Complementing Docker with PuppetDocker, Inc.
 

What's hot (15)

&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
Zsh & fish: better *bash* for hackers
Zsh & fish: better *bash* for hackersZsh & fish: better *bash* for hackers
Zsh & fish: better *bash* for hackers
 
File::CleanupTask
File::CleanupTaskFile::CleanupTask
File::CleanupTask
 
Capistrano Rails
Capistrano RailsCapistrano Rails
Capistrano Rails
 
Puppet without Root - PuppetConf 2013
Puppet without Root - PuppetConf 2013Puppet without Root - PuppetConf 2013
Puppet without Root - PuppetConf 2013
 
Tame your Infrastructure with Puppet
Tame your Infrastructure with PuppetTame your Infrastructure with Puppet
Tame your Infrastructure with Puppet
 
Hgignore global
Hgignore globalHgignore global
Hgignore global
 
Zsh shell-for-humans
Zsh shell-for-humansZsh shell-for-humans
Zsh shell-for-humans
 
puppet @techlifecookpad
puppet @techlifecookpadpuppet @techlifecookpad
puppet @techlifecookpad
 
Top 28 programming language with hello world for artificial intelligence
Top 28 programming language with  hello world for artificial intelligenceTop 28 programming language with  hello world for artificial intelligence
Top 28 programming language with hello world for artificial intelligence
 
Gitkata fish shell
Gitkata fish shellGitkata fish shell
Gitkata fish shell
 
Pimp my dev box (Friday Training at Itnig)
Pimp my dev box (Friday Training at Itnig)Pimp my dev box (Friday Training at Itnig)
Pimp my dev box (Friday Training at Itnig)
 
NUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialNUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline Tutorial
 
Jsconf.us.2013
Jsconf.us.2013Jsconf.us.2013
Jsconf.us.2013
 
Complementing Docker with Puppet
Complementing Docker with PuppetComplementing Docker with Puppet
Complementing Docker with Puppet
 

Similar to Hubot

ChatOps meetup: les humains parlent aux robots
ChatOps meetup: les humains parlent aux robotsChatOps meetup: les humains parlent aux robots
ChatOps meetup: les humains parlent aux robotsOlivier Jacques
 
How to build a slack-hubot with js
How to build a slack-hubot with jsHow to build a slack-hubot with js
How to build a slack-hubot with jsJuneyoung Oh
 
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSHTame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSHDavid Stockton
 
AWS CodeDeploy + Github
AWS CodeDeploy + GithubAWS CodeDeploy + Github
AWS CodeDeploy + GithubHyunJin CHA
 
Question 1.Discuss at least three ways in which Henry David Thor.docx
Question 1.Discuss at least three ways in which Henry David Thor.docxQuestion 1.Discuss at least three ways in which Henry David Thor.docx
Question 1.Discuss at least three ways in which Henry David Thor.docxIRESH3
 
Fos sintro pres-dav
Fos sintro pres-davFos sintro pres-dav
Fos sintro pres-davParin Sharma
 
Hue: The Hadoop UI - Hadoop Singapore
Hue: The Hadoop UI - Hadoop SingaporeHue: The Hadoop UI - Hadoop Singapore
Hue: The Hadoop UI - Hadoop Singaporegethue
 
Little Puppet Tools To Make Your Life Better
Little Puppet Tools To Make Your Life BetterLittle Puppet Tools To Make Your Life Better
Little Puppet Tools To Make Your Life BetterPeter Souter
 
Two single node cluster to one multinode cluster
Two single node cluster to one multinode clusterTwo single node cluster to one multinode cluster
Two single node cluster to one multinode clustersushantbit04
 
Writing a slack chatbot DrupalCampLA
Writing a slack chatbot DrupalCampLAWriting a slack chatbot DrupalCampLA
Writing a slack chatbot DrupalCampLAJesus Manuel Olivas
 
Developing IT infrastructures with Puppet
Developing IT infrastructures with PuppetDeveloping IT infrastructures with Puppet
Developing IT infrastructures with PuppetAlessandro Franceschi
 
OpenShift Express Intro
OpenShift Express IntroOpenShift Express Intro
OpenShift Express IntroMax Andersen
 
Symphony Chatbot with Hubot
Symphony Chatbot with HubotSymphony Chatbot with Hubot
Symphony Chatbot with HubotJon Freedman
 
Hadoop installation
Hadoop installationHadoop installation
Hadoop installationAnkit Desai
 

Similar to Hubot (20)

ChatOps meetup: les humains parlent aux robots
ChatOps meetup: les humains parlent aux robotsChatOps meetup: les humains parlent aux robots
ChatOps meetup: les humains parlent aux robots
 
How to build a slack-hubot with js
How to build a slack-hubot with jsHow to build a slack-hubot with js
How to build a slack-hubot with js
 
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSHTame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
 
Writing a slack chatbot seattle
Writing a slack chatbot seattleWriting a slack chatbot seattle
Writing a slack chatbot seattle
 
AWS CodeDeploy + Github
AWS CodeDeploy + GithubAWS CodeDeploy + Github
AWS CodeDeploy + Github
 
Question 1.Discuss at least three ways in which Henry David Thor.docx
Question 1.Discuss at least three ways in which Henry David Thor.docxQuestion 1.Discuss at least three ways in which Henry David Thor.docx
Question 1.Discuss at least three ways in which Henry David Thor.docx
 
Fos sintro pres-dav
Fos sintro pres-davFos sintro pres-dav
Fos sintro pres-dav
 
Hue: The Hadoop UI - Hadoop Singapore
Hue: The Hadoop UI - Hadoop SingaporeHue: The Hadoop UI - Hadoop Singapore
Hue: The Hadoop UI - Hadoop Singapore
 
CouchDB Day NYC 2017: Core HTTP API
CouchDB Day NYC 2017: Core HTTP APICouchDB Day NYC 2017: Core HTTP API
CouchDB Day NYC 2017: Core HTTP API
 
Little Puppet Tools To Make Your Life Better
Little Puppet Tools To Make Your Life BetterLittle Puppet Tools To Make Your Life Better
Little Puppet Tools To Make Your Life Better
 
Two single node cluster to one multinode cluster
Two single node cluster to one multinode clusterTwo single node cluster to one multinode cluster
Two single node cluster to one multinode cluster
 
CouchDB Day NYC 2017: Mango
CouchDB Day NYC 2017: MangoCouchDB Day NYC 2017: Mango
CouchDB Day NYC 2017: Mango
 
Writing a slack chatbot DrupalCampLA
Writing a slack chatbot DrupalCampLAWriting a slack chatbot DrupalCampLA
Writing a slack chatbot DrupalCampLA
 
Developing IT infrastructures with Puppet
Developing IT infrastructures with PuppetDeveloping IT infrastructures with Puppet
Developing IT infrastructures with Puppet
 
OpenShift Express Intro
OpenShift Express IntroOpenShift Express Intro
OpenShift Express Intro
 
ChatOps
ChatOpsChatOps
ChatOps
 
Symphony Chatbot with Hubot
Symphony Chatbot with HubotSymphony Chatbot with Hubot
Symphony Chatbot with Hubot
 
Hadoop installation
Hadoop installationHadoop installation
Hadoop installation
 
Puppet_training
Puppet_trainingPuppet_training
Puppet_training
 
Git ongithub
Git ongithubGit ongithub
Git ongithub
 

More from thehoagie

Pair programming
Pair programmingPair programming
Pair programmingthehoagie
 
Docker presentation
Docker presentationDocker presentation
Docker presentationthehoagie
 
Database 101
Database 101Database 101
Database 101thehoagie
 
Git Pro Tips
Git Pro TipsGit Pro Tips
Git Pro Tipsthehoagie
 
Null object pattern
Null object patternNull object pattern
Null object patternthehoagie
 
Big tables and you - Keeping DDL operatations fast
Big tables and you - Keeping DDL operatations fastBig tables and you - Keeping DDL operatations fast
Big tables and you - Keeping DDL operatations fastthehoagie
 
Angular.js - An introduction for the unitiated
Angular.js - An introduction for the unitiatedAngular.js - An introduction for the unitiated
Angular.js - An introduction for the unitiatedthehoagie
 
Regular expression presentation for the HUB
Regular expression presentation for the HUBRegular expression presentation for the HUB
Regular expression presentation for the HUBthehoagie
 
Converting your JS library to a jQuery plugin
Converting your JS library to a jQuery pluginConverting your JS library to a jQuery plugin
Converting your JS library to a jQuery pluginthehoagie
 
Active records before_type_cast
Active records before_type_castActive records before_type_cast
Active records before_type_castthehoagie
 

More from thehoagie (11)

Pair programming
Pair programmingPair programming
Pair programming
 
Docker presentation
Docker presentationDocker presentation
Docker presentation
 
Database 101
Database 101Database 101
Database 101
 
Testing
TestingTesting
Testing
 
Git Pro Tips
Git Pro TipsGit Pro Tips
Git Pro Tips
 
Null object pattern
Null object patternNull object pattern
Null object pattern
 
Big tables and you - Keeping DDL operatations fast
Big tables and you - Keeping DDL operatations fastBig tables and you - Keeping DDL operatations fast
Big tables and you - Keeping DDL operatations fast
 
Angular.js - An introduction for the unitiated
Angular.js - An introduction for the unitiatedAngular.js - An introduction for the unitiated
Angular.js - An introduction for the unitiated
 
Regular expression presentation for the HUB
Regular expression presentation for the HUBRegular expression presentation for the HUB
Regular expression presentation for the HUB
 
Converting your JS library to a jQuery plugin
Converting your JS library to a jQuery pluginConverting your JS library to a jQuery plugin
Converting your JS library to a jQuery plugin
 
Active records before_type_cast
Active records before_type_castActive records before_type_cast
Active records before_type_cast
 

Recently uploaded

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 

Recently uploaded (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

Hubot

  • 2. Did You Know? Hubot is a robot Its pronounced Hew-bot Hubot is here to help you automate all the menial things If you know Javascript/CoffeeScript syntax, you can write Hubot logic! Hubot uses Redis as its “Brain” so you can persist data Influence Health is using Hubot already!
  • 3. How do I run Hubot Hubot requires Node.JS. (It's what all the cool kids are doing) $ brew install nodejs (Or download at https://nodejs.org/en/) $ npm install -g yo generator-hubot $ mkdir myhubot $ cd myhubot $ yo hubot
  • 4. Hubot can Listen robot.hear /badger/i, (res) -> res.send "Badgers? BADGERS? WE DON'T NEED NO STINKIN BADGERS" Hubot is listening, and then taking an action in response to that event
  • 5. Hubot can Reply robot.respond /open the pod bay doors/i, (res) -> res.reply "I'm afraid I can't let you do that." Hubot can reply to the author of a message. Hubot will only reply when @ mentioned
  • 6. PR Assignment Example Use case: When we open a PR we want all developers to share in the reviewing of those pull requests. 1)Establish a pool of reviewers 2)Map Slack/Github usernames 3)Remember who went last, and assign to the next reviewer Slack has a Github integration that will announce new PRs in a channel. Hubot can be invited to this channel and listen for messages. <Show example assign.coffee>
  • 7. Testing Hubot To run a Hubot REPL: $ ./bin/hubot Create a test Slack room (or join #hubot-test) Invite Hubot from within the Slack channel (/invite @hubot) Create a web hook at https://api.slack.com/incoming-webhooks $ curl -X POST -H 'Content-type: application/json' --data '{"text":"foo"}' https://hooks.slack.com/services/<hook>
  • 8. Testing Hubot Continued HUBOT_SLACK_TOKEN=xxxx ./bin/hubot --adapter slack The Slack token is obtained when you create your web hook
  • 9. Gotchas on Listening Hubot can hear in two ways: 1)Other users (e.g. humans like you and me) 2)Other integrations (e.g. robots like the Github integration) You must define which listening event you want to listen for: robot.hear vs robot.listeners.push
  • 10. Gotchas Continued A message source might be different than the rendering: This is formatted, and the source looks like this: Pull request submitted: <hyperlink info…> by jeremydefibaugh Pay attention when matching, and use console.log
  • 11. Contributing If you think of a useful Hubot feature, then please hack away. The hubot source code for IH can be found at https://github.com/BrightWhistle/hubot Or you have a feature request, or issue, report it on the repo, and someone else can pick it up!