LoginSignup
15
15

More than 5 years have passed since last update.

hubot-scriptのエイリアス

Posted at

最近、hubotのスクリプトばかり作ってる気がするが、今回はhubot-aliasを作ってみた。

例えば、hubot-browserstackhubot screenshot http://www.google.comのように使うけど、screenshotって打つのめんどくさいよね、でもオリジナルのrepoは短い名前に対応してくれそうにないよね、という時にこれ使います。

hubot alias scst=screenshotとhubotに教えると、次回からhubot scst http://www.google.comでhubotが応えてくれるようになります。

aliasを消す時はhubot alias scst=でaliasのリストを見る時はhubot alias

単純なhubot-scriptだけど、まあまあ使えるかも。

ちなみに仕組みはhubot-privilegeとほとんど同じ。
hubotのreceive関数をフックしてます。

15
15
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
15